User: Password:
|
|
Subscribe / Log in / New account

A false midnight

A false midnight

Posted Mar 13, 2014 0:56 UTC (Thu) by zuki (subscriber, #41808)
In reply to: A false midnight by mpr22
Parent article: A false midnight

The "distance" between Python 2.7 and 3.3 is not that great, and certainly many times smaller than between 2.5 and 3.0. Writing code that runs on latest 2.x and 3.x is not too complicated. It won't be able to use some stuff that is in Python 3 only, but the code is nice, without too many kludgy workarounds.


(Log in to post comments)

A false midnight

Posted Mar 13, 2014 4:33 UTC (Thu) by dlang (subscriber, #313) [Link]

the issue isn't writing something new, it's continuing to run older stuff without re-writing it.

how much stuff is there that will run on 2.7 that won't run on 3.3? I'm talking about stuff written for earlier 2.x versions that continues to run on 2.7, but won't run on 3.3.

A false midnight

Posted Mar 14, 2014 19:16 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

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

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 © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds