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/2004-February/042645.html below:

Plea for function/method syntax sugar (PEP 318, with a different syntax)

[Python-Dev] Re: Plea for function/method syntax sugar (PEP 318, with a different syntax)Thomas Heller 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:
>>
>>class Foo(object):
>>     __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.

Thomas


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