On 5/12/05, Steven Bethard <[EMAIL PROTECTED]> wrote: >super doesn't work with "meta-attributes" and classmethods: > > py> super(C, C).__name__ > Traceback (most recent call last): > File "<interactive input>", line 1, in ? > AttributeError: 'super' object has no attribute '__name__'
Actually this is the Right Thing to do for super. It is something to be aware of, not something to change. Since __name__ is a descriptor defined in the type metaclass and not an attribute defined in the base class, super correctly does not retrieve it. It is enough to add some documentation about "super" caveats and nonobvious points. What I really dislike is super called with only one argument since it has many unpleasant surprises and not real advantages :-( Michele Simionato _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com