meteclasses 2.x/3.x compatibility

James Mills prologic at shortcircuit.net.au
Tue Apr 19 21:56:35 EDT 2011


Hi all,
Is there a compatible way to use meteclasses
in both Python 2.x (2.6 to 2.7) and Python 3.x
(3.0 to 3.2).
Python 2.x:
class Foo(object):
 __meteclass__ = MyMetaClass
Python 3.x:
class Foo(metaclass=MyMetaClass):
 pass
Thanks,
cheers
James
-- 
-- James Mills
--
-- "Problems are solved by method"


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /