seq icon indicating copy to clipboard operation
seq copied to clipboard

print should be a function!

Open jamestwebber opened this issue 4 years ago • 4 comments

(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 avatar Jul 21 '21 15:07 jamestwebber

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.

jamestwebber avatar Jul 21 '21 15:07 jamestwebber

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!

arshajii avatar Jul 22 '21 15:07 arshajii

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...)

inumanag avatar Jul 28 '21 18:07 inumanag

(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.

jamestwebber avatar Jul 28 '21 18:07 jamestwebber