4 ms·
In almost every Python-related project I work on, we're developing in an exciting new language called "Python 2-compatible Python 3 subset". Twice as must test
by radarsat1 9y ago
In almost every Python-related project I work on, we're developing in an exciting new language called "Python 2-compatible Python 3 subset". Twice as must testing, twice as much fun!
- crncosta 9y agoYes, this is exactly the issue. Porting to Python 3 was never an issue itself, but keep your code compatible with Python 2 (while introduce 3) is a nightmare :P
- skykooler 9y agoI've been working on one project that needs to work in every Python verson from 2.4 to 3.3. There are some pretty fun gymnastics getting some syntax to work.
- madez 9y agoWhy wouldn't we build a vehicle that can drive on streets, on rails, can fly, swim and dig through the earth? It would be a marvellous construction. And awful engineering. I'm not blaming the person who builds the machine in the end, but the person that sets up the specification – they are doing a bad job.
- metafunctor 9y agoAre all these projects some sort of libraries? Is that why you need to support both Python 2 and Python 3? All the projects I've worked on moved to Python 3 and never looked back.
- daveFNbuck 9y agoIf it's a large project, you can't necessarily move everything to Python 3 all at once. You can't break Python 2 compatibility until everything works in Python 3.
- radarsat1 9y agoPartly that, and partly dependencies. For example in one project we use VTK for visualization. The Python VTK wrapper until recently only supported Python 2. So the rest of the project is Python2/3 compatible, but to run the visualization we have to run the Python 2 version. VTK itself recently does support Python 3, but it's not in Debian/Ubuntu yet. And we'd have to upgrade our code to VTK 7. (Now 8, I believe, seems we've skipped a version.) So... lots of inertia all around, basically. The result is that in the meantime (meantime being like, 2 years), we compile Python 2 and Python 3 versions of everything. Not to mention that it's hard to justify breaking user's code that we aren't in control of just to tell them to fix their print statements -- though obviously we'll get there eventually.
- metafunctor 9y agoIn the meantime, we just kept with Python 2. When all dependencies were there, we made the switch.
- twobyfour 9y agoPlease tell me you at least use six?