[Python-3000] Metaclasses in Py3K
ironfroggy at gmail.com
Sat Dec 9 11:53:20 CET 2006
On 12/9/06, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> > At 08:53 AM 12/8/2006 -0600, Guido van Rossum wrote:
> >>I've been thinking about this too, and I think it's reasonable to let
> >>the metaclass provide the dict to be used as locals.
> > [snip]
> >>class C(B1, B2, metaclass=Foo):
> If there's to be a special syntax for this, I don't
> think it should have the word "metaclass" in it --
> it's too verbose and too jargony.
> How about
> class C(B1, B2) is M:
> This is concise, keeps the metaclass clearly
> separated from the list of bases, and avoids
> creating any new keywords.
> Python-3000 mailing list
> Python-3000 at python.org
> Unsubscribe: http://mail.python.org/mailman/options/python-3000/ironfroggy%40gmail.com
The obvious problem with a metaclass specific syntax is that it doesnt
allow for other things. Adding keyword options to class declarations
means you could do things beyond just metaclasses, such as interfaces,
if that happens.
Read my blog! I depend on your acceptance of my opinion! I am interesting!
More information about the Python-3000