Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

print should be a function! #223

Open
jamestwebber opened this issue Jul 21, 2021 · 4 comments
Open

print should be a function! #223

jamestwebber opened this issue Jul 21, 2021 · 4 comments

Comments

@jamestwebber
Copy link

(sorry, I just had to)

Python 2 has been deprecated for 1.5 years now. The "make print a function" PEP is 15 years old! I don't think there's any justification for resurrecting this relic in a new language, if you want it to feel like (modern) Python. It will only serve to confuse people.

@jamestwebber
Copy link
Author

After a search I found this comment so I guess you support both syntax? At the very least I would recommend updating your docs and examples to encourage the python 3 syntax, but really I think it'd be better to deprecate the python 2 syntax.

@arshajii
Copy link
Member

Hey @jamestwebber, yes the print statement is mainly an artifact of early versions of Seq which we kept around. We will probably phase it out over upcoming releases, and the docs should definitely be updated to use the function version!

@inumanag
Copy link
Collaborator

Hi @jamestwebber,

Yes, print right now supports both modes, and we'll update the docs soon (print function landed quite recently). print (note the space) is a statement, and it will most likely stay that way for the foreseeable future. So print(1, 2) is not the same as print (1, 2).

We will probably add a "strict Python 3" mode (or "Py2 compatibility mode") for people who don't like this behaviour.

(as for myself, I think that deprecating print statement is one of the saddest Python decision ever made...)

@jamestwebber
Copy link
Author

(as for myself, I think that deprecating print statement is one of the saddest Python decision ever made...)

I still type print via muscle memory sometimes, but I don't think it matters how we feel about it–a consistent interface is way more important.

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

No branches or pull requests

3 participants