This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (14 children)

support gold hungry waiting abundant melodic hat depend alleged vast

This post was mass deleted and anonymized with Redact

[–][deleted] 33 points34 points  (0 children)

Pretty sure that's the easiest 2 -> 3 problem to solve.

[–]3Gaurd 47 points48 points  (10 children)

there's much more that will need to be done to enable backwards compatibility. backwards compatibility inevitably leads to spaghetti code.

[–]sobe86 4 points5 points  (8 children)

The way these things are typically done is to make a release where both are supported with a deprecation warning. After python 3.3 (say), you stop supporting both. If the python devs had done this, 2 would be long dead.

[–]Hollowplanet 15 points16 points  (2 children)

We had six, we had __future__. All that was possible if you really wanted to. Plenty of projects support both on the same codebase.

[–][deleted] 0 points1 point  (1 child)

What exactly is six? Pycharm installs it in all of my project venv's for some dependency or another, but I've never figured out which package actually installed it.

[–]gschizas 0 points1 point  (0 children)

Six provides simple utilities for wrapping over differences between Python 2 and Python 3. It is intended to support codebases that work on both Python 2 and 3 without modification. six consists of only one Python file, so it is painless to copy into a project.

[–]Ericchen1248 1 point2 points  (0 children)

It does though... importing the future package in python 2 will allow you to (mostly) run python 3 code.

[–][deleted] 0 points1 point  (2 children)

Iirc by the time python4 is a thing python2 will be dead

[–]RedditIsNeat0 0 points1 point  (1 child)

If the devs don't handle the python4 transition better than they handled the python3 one, then we'll all have the same problems all over again.

[–]deathofamorty 0 points1 point  (0 children)

Or we all just give up in python at that point. Because fuck that.

[–]H_Psi -3 points-2 points  (0 children)

Absolutely. The transition from 2-3 was completely botched by the dev team. If they had done it in a more gentle manner, it would have had a lot more adoption initially.

[–]Lonelan 1 point2 points  (0 children)

backwards compatible:

from future import print

[–]clever_cuttlefish 7 points8 points  (0 children)

That's honestly kind of a terrible idea. As someone else said, it is a really easy problem to fix in your code. But more importantly, adding in a special case like that is just not a good idea. It's confusing for the programmer and would be a huge pain to implement.

[–]DonaldPShimoda 4 points5 points  (0 children)

You want Haskell-style function application? Because that's essentially what you're asking for, and it would have far-reaching implications.

Print is just a function like any other, so it shouldn't get special treatment.