[Python-3000] PEP for Metaclasses in Python 3000

Jim Jewett jimjjewett at gmail.com
Thu Mar 15 14:31:53 CET 2007


On 3/9/07, Talin <talin at acm.org> wrote:
>      Note that the Python interpreter will check to insure that the
>      __metacreate__ attribute exists before calling it. This preserves
>      backwards compatibility with existing metaclasses.

You might want to be even more explicit and say

If the metaclass does not have a __prepare__ attribute, then the
interpreter will supply an empty mapping.  (I was tempted to say
"ordinary dict", but that might not be true in, say, a secured mode.)

-jJ


More information about the Python-3000 mailing list