A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-June/036159.html below:

[Python-Dev] Sneaky 'super' instances

[Python-Dev] Sneaky 'super' instances [Python-Dev] Sneaky 'super' instancesRaymond Hettinger python@rcn.com
Tue, 10 Jun 2003 23:59:59 -0400
> > Bug 729103 discovered an interesting little issue; 'super' instances 
> > cause inspect.isroutine to return True since it also poses as a non-data 
> > descriptor.  Now this is bad because pydoc then tries to get a __name__ 
> > attribute out of it which it lacks because it is an instance of a class 
> > and not really a function or method.
> > 
> > So, should I change inspect.isroutine to check to see if its argument is 
> > an instance of 'super'?  

That is a reasonable short-term solution but it should go 
one layer down in ismethoddescriptor().  Append the line:

    and not isinstance(object, super)


Raymond Hettinger



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4