[Python-3000] PEP for Metaclasses in Python 3000

Nick Coghlan ncoghlan at gmail.com
Tue Mar 13 23:19:48 CET 2007


Josiah Carlson wrote:
> But in slightly longer examples, I think that the looks are
> significantly improved...
> 
>     class Foo(base1, base2, *otherbases, metaclass=mymeta,
>         private=True, **kwargs):
>         ...
> 
> vs.
> 
>     @@(metaclass=mymeta, private=True, **kwargs)
>     class Foo(base1, base2, *otherbases):
>         ...
> 

vs.

      class Foo(base1, base2, *otherbases,
                metaclass=mymeta, private=True, **kwargs):

When it comes to long class headers, I think vertical whitespace will 
prove to be useful for separating out the keywords and the list of bases.

Regards,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-3000 mailing list