Posts: 4,646
Threads: 1,493
Joined: Sep 2016
as we all know, version 3 changed the print statement to a built in print() function. i am curious why and also curious why not other statements.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,646
Threads: 1,493
Joined: Sep 2016
Oct-18-2017, 01:25 AM
(This post was last modified: Oct-18-2017, 01:28 AM by Skaperen.)
what PEP describes the changes to print() in 3.6?
when i was just getting started with python, one of the first things i created was a function to do printing. it had the name pr() only because "print" was a reserved word. but i got all the ability of having print as a function. today, knowing more, if i still needed to do this, i'd add a few more features. but i still don't see the reason to do this in the language itself, other than a module needed to be imported (this could have been added to the interpreter, to auto-import certain modules). and, still, why not (also) some other things, like the del statement?
also, why not a transition phase, where both the function and the statement could coexist?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.