[Python-Dev] Re: Plea for function/method syntax sugar (PEP
318, with a different syntax)
theller at python.net
Thu Feb 19 15:39:47 EST 2004
"Phillip J. Eby" <pje at telecommunity.com> writes:
> At 08:45 PM 2/19/04 +0100, Thomas Heller wrote:
>>But there is not really a dramatical advantage over this notation, with
>>a suitable metaclass:
>> __metaclass__ = SomeMetaclass
>> __provides__ = [IFoo]
> Actually, there *is* a dramatic advantage over that notation, since
> the idea is to allow the object to retain its *own* metaclass, not
> force it to use a different one.
> The "magic" syntax used by Zope and PyProtocols leaves the original
> class definition's metaclass completely unchanged, and the class
> decorator syntax could do the same.
I see, it makes sense now.
More information about the Python-Dev