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/2005-May/053656.html below:

[Python-Dev] a patch to inspect and a non-feature request

[Python-Dev] a patch to inspect and a non-feature requestSteven Bethard steven.bethard at gmail.com
Thu May 12 16:08:20 CEST 2005
On 5/12/05, Michele Simionato <michele.simionato at gmail.com> wrote:
> In my experience super is a huge can of worms and actually I have a non-feature
> request about the descriptor aspect of super: I would like super's
> __get__ method
> and the possibily to call super with just one argument to be removed
> in Python 3000.

+1 while super doesn't work with "meta-attributes" and classmethods:

py> class B(object):
...     "The B type"
...     @classmethod
...     def m(cls):
...         print "B.m"
... 
py> class C(B):
...     @classmethod
...     def m(cls):
...         print "C.m"
...         cls._sup.m()
... 
py> C._sup = super(C)
py> super(C, C).__doc__
'The B type'
py> super(C, C).__name__
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
AttributeError: 'super' object has no attribute '__name__'
py> C().m()
C.m
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "<interactive input>", line 5, in m
AttributeError: 'super' object has no attribute 'm'

STeVe
-- 
You can wordify anything if you just verb it.
        --- Bucky Katt, Get Fuzzy
More information about the Python-Dev mailing list

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