|
|
Subscribe / Log in / New account

A false midnight

A false midnight

Posted Mar 12, 2014 19:47 UTC (Wed) by zuki (subscriber, #41808)
In reply to: A false midnight by khim
Parent article: A false midnight

If a bug was found in gcc 3.4, the solution would be the same: move to some current version, the bug will be fixed there.


to post comments

A false midnight

Posted Mar 12, 2014 20:12 UTC (Wed) by dlang (guest, #313) [Link]

the difference is that gcc at least pretends to have backwards compatibility (to be able to keep working with older source code), python 3 explicitly doesn't, so it's not nearly as simple.

A false midnight

Posted Mar 12, 2014 20:29 UTC (Wed) by mpr22 (subscriber, #60784) [Link] (4 responses)

Which has a lot less scope for pain (mostly, I suspect, relating to the behaviour of the optimizer) than upgrading from Python 2 to Python 3 does. gcc 3.4 supports ISO C90, ISO C99, and ISO C++98, and so does gcc 4.9. Version 3.4 of the Python interpreter does not support the version of the Python language supported by version 2.7 of the Python interpreter, and a quick look suggests that the available machine-translation approach is in the realms of "good, but definitely not fully reliable".

A false midnight

Posted Mar 13, 2014 0:56 UTC (Thu) by zuki (subscriber, #41808) [Link] (3 responses)

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.

A false midnight

Posted Mar 13, 2014 4:33 UTC (Thu) by dlang (guest, #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] (1 responses)

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