Skip to content

updated mopad.py to python3 compatible with 2to3#5

Open
cossatot wants to merge 2 commits intogeophysics:masterfrom
cossatot:master
Open

updated mopad.py to python3 compatible with 2to3#5
cossatot wants to merge 2 commits intogeophysics:masterfrom
cossatot:master

Conversation

@cossatot
Copy link
Copy Markdown

Hey y'all, I've converted MoPaD to python 3 compatibility. Thanks for making the awesome tool!

@cossatot cossatot mentioned this pull request Mar 19, 2015
@QuLogic
Copy link
Copy Markdown

QuLogic commented Mar 22, 2015

If you're going to use the print function, then you should from __future__ import print_function, or else you'll get the issue that resulted in the second commit here.

@cossatot
Copy link
Copy Markdown
Author

Yeah, I understand the problem. I didn't closely inspect the output from 2to3 before committing; I expected 2to3 to automatically produce code that would be compatible with both. Nonetheless, getting rid of the end=' 's still cleans things up a bit.

@QuLogic
Copy link
Copy Markdown

QuLogic commented Mar 23, 2015

Yes, but I mean you should add it anyway. Unless you're aiming for compatibility with Python 2.5 (which is ancient), there's no reason not to do so, and it will reduce the chance of the same confusion occurring with some other developer later on.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants