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-March/033846.html below:

[Python-Dev] super() bug (?)

[Python-Dev] super() bug (?) [Python-Dev] super() bug (?)Samuele Pedroni pedronis@bluewin.ch
Thu, 6 Mar 2003 18:21:40 +0100
>>> class C(object):
...  def f(self): pass
...
>>> class D(C): pass
...
>>> D.f
<unbound method D.f>
>>> super(D,D).f
<bound method D.f of <class '__main__.D'>>

I think this should produce the same thing as D.f,

that means implementation-wise

f.__get__(None,D) should be called

not f.__get__(D,D).

_.__get__(None,D) would still do the right thing for static AND class methods:

>>> def g(cls): pass
...
>>> classmethod(g).__get__(None,D)
<bound method type.g of <class '__main__.D'>>





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