evaluation question
Muttley at dastardlyhq.com
Muttley at dastardlyhq.com
Wed Feb 1 03:56:40 EST 2023
On Tue, 31 Jan 2023 21:00:53 +0000
Mark Bourne <nntp.mbourne at spamgourmet.com> wrote:
>Greg Ewing wrote:
>> On 30/01/23 10:41 pm, Muttley at dastardlyhq.com wrote:
>>> What was the point of the upheaval of converting
>>> the print command in python 2 into a function in python 3 if as a
>>> function
>>> print() doesn't return anything useful?
>>
>> It was made a function because there's no good reason for it
>> to have special syntax in the language.
>
>I think I saw somewhere that making print a function also had something
>to do with being able to add extra keyword arguments like sep and end.
>The syntax for printing to a specific file already seemed a bit odd with
>the print statement, and adding extra arguments would have made it even
>more clunky (yeah, I know ">>" is similar to C++ streams, but it looks
>out of place in Python).
Why couldn't they just keep "print" and call the function , oh I dunno,
"printf" ? :)
More information about the Python-list
mailing list