Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer using py3 compatible syntax over 2.x-only syntax #17

Open
ermo opened this issue Apr 17, 2013 · 3 comments
Open

Prefer using py3 compatible syntax over 2.x-only syntax #17

ermo opened this issue Apr 17, 2013 · 3 comments

Comments

@ermo
Copy link

ermo commented Apr 17, 2013

If one day we decide to port flimage to python3, it will probably make the porting process less painful if we have the foresight to begin adopting forward compatible py2.x syntax and idioms.

A simple example would be print() and string substitution:

# forward compatible from 2.6 -> 3.x (note the extra parentheses)
print("There are %s types of people in the world; those who understand binary and those who don't." %
      (bin(2)[2:]))

Additional resources:

@johnsonm
Copy link
Owner

@johnsonm
Copy link
Owner

We should care about compatibility only with py3.latest (at whatever time we really care) and they have been re-adding some py2 features to make porting easier so I don't want to care about compatibility with py3.early and make gratuitous changes.

@ermo
Copy link
Author

ermo commented Apr 18, 2013

Objectively, I cannot find fault with that point of view.

I suppose the fact that, subjectively, I genuinely prefer coding in Py3 over Py2 does tend to color my perception of the importance of this particular issue. Yet, "Python 3 just feels better to me" doesn't strike me as being particularly likely to be a successful line of argument with you... g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants