[Python-3000] PEP for Metaclasses in Python 3000

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Mar 11 07:13:07 CET 2007


Talin wrote:
> The main reason for doing it the way that I did, is to allow for 
> the future possibility of the *default* metaclass interpreting some of 
> those keywords.

Hmmm. I can see how you would need some way of passing
keywords in order to do that. But in the absence of any
real use cases, it still smells like a big YAGNI to me.

Note that you can already pass information to the
metaclass itself using special attributes in the class
namespace. This would only be need if you absolutely
had to pass information when creating the *dict*.
Things like your 'sealed' option don't seem to fall
into that category.

(I hope Python never gets anything like 'sealed',
btw, but I realise it was just an example.)

--
Greg


More information about the Python-3000 mailing list