|
|
Subscribe / Log in / New account

A false midnight

A false midnight

Posted Mar 14, 2014 19:16 UTC (Fri) by mathstuf (subscriber, #69389)
In reply to: A false midnight by zuki
Parent article: A false midnight

How do you do metaclasses supporting both? Python3's way is a syntax error in Python2 and Python2's way is ignored in Python3.


to post comments

A false midnight

Posted Mar 15, 2014 12:58 UTC (Sat) by edomaur (subscriber, #14520) [Link]

Well, you can use the six library, there is some tools for that very case :
http://pythonhosted.org/six/#six.with_metaclass


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds