from __future__ import print

Diez B. Roggisch deets at nospam.web.de
Sun Apr 20 09:27:13 EDT 2008


Lie schrieb:
> On Apr 13, 7:23 pm, Roy Smith <r... at panix.com> wrote:
>> In article
>> <ce23a66d-ac4b-4f23-a9ea-8d1592b08... at w8g2000prd.googlegroups.com>,
>>
>>  Lie <Lie.1... at gmail.com> wrote:
>>>  I wish py3k
>>> would make it an option whether to treat print as statement or
>>> function though.
>> Arrrgghhhhh!  No, don't even go there.  If you want optional parens, use
>> Perl :-)
> 
> Not optional parens, but a simple print statement coupled with a
> powerful print function. This print statement would only have basic
> printing functionality such as :
> 
> print "Hello"
> print var
> print var, "Hello too"
> 
> specifically, these would be removed:
> print var,
> print >> unstdout, var
> 
> This is because it is sometimes annoying to type this:
> print("Hello")
> print("World")
> print("This")
> print("is")
> print("Captain")
> print("Kirk")

You are aware that it is only one character more to type?

It is debatable if print should have gone or not - but once you decide 
to have a print-statement I fail to see why you want to rid it of 
functionality. The costs for a keyword and special parsing rules are 
paid anyway then.

Diez

Diez



More information about the Python-list mailing list