[Python-Dev] a patch to inspect and a non-feature request
Steven 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