inherit without calling parent class constructor?
Steven Bethard
steven.bethard at gmail.com
Wed Jan 26 18:02:47 EST 2005
Christian Dieterich wrote:
> On Dé Céadaoin, Ean 26, 2005, at 13:45 America/Chicago, Steven Bethard
> wrote:
>
>> Note that:
>> @deco
>> def func(...):
>> ...
>> is basically just syntactic sugar for:
>> def func(...):
>> ...
>> func = deco(func)
>
>
> Oh, I learned something new today :-) Nice thing to know, these
> descriptors.
Just a note of clarification:
The @deco syntax is called *decorator* syntax.
Classes with a __get__ method are called *descriptors*.
But yes, they're both nice things to know. ;)
Steve
More information about the Python-list
mailing list