Skip to content

DOC: Change print statements to print function calls #4967

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

Closed
alefnula opened this issue Sep 24, 2013 · 9 comments · Fixed by #4972
Closed

DOC: Change print statements to print function calls #4967

alefnula opened this issue Sep 24, 2013 · 9 comments · Fixed by #4972
Labels
Milestone

Comments

@alefnula
Copy link
Contributor

Suggestion: Changing print open('bar.csv').read() statements to print(open('bar.csv').read()) in documentation would make the docs more compatible with Python3.X and still keep it compatible with Python2.X.

@alefnula
Copy link
Contributor Author

I can take this if nobody is working on that already...

@jreback
Copy link
Contributor

jreback commented Sep 24, 2013

go 4 it....

@alefnula
Copy link
Contributor Author

@jreback Just one thing: I see that you use print (...) in lot of places instead of print(...). Is this just a 2to3 thing or there is a convention to use it with a space between the print and the open bracket? print(...) works with 2.6, 2.7, ... and since it's a function in 3.X I prefer that syntax. But if the convention is to use it with the space between I'll change the docs that way.

@jreback
Copy link
Contributor

jreback commented Sep 24, 2013

I am not sure it matters (prob just a typo if that's the case).....prob print(...)is more correct

@alefnula
Copy link
Contributor Author

I also changed all the print statements in the code (not just the docs) to print(...). I can also add that to this pull request. Or I should create a new issue?

@jreback
Copy link
Contributor

jreback commented Sep 24, 2013

no code should have print statements, and they would break py3, do you have an example?

@alefnula
Copy link
Contributor Author

@jreback Not directly in the code but in the comments and docstrings. Also in sphinxexts, scripts, vb_suite...

@jreback
Copy link
Contributor

jreback commented Sep 24, 2013

ahh....sure go ahead with that ....you can put it in another commit with this one.....

just be aware that these are not directly tested so just validate as you go

@jtratner
Copy link
Contributor

@alefnula please put that in a separate issue and @jreback need to have enough time to review that one...somewhat easy to break the code in vbench by accident (since it's not tested directly)

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

Successfully merging a pull request may close this issue.

3 participants