Terry Reedy wrote:
> "Ron Adam" <[EMAIL PROTECTED]> wrote in message 
> news:[EMAIL PROTECTED]
> 
>># standard printing
>>write.ln(1, 2, 3)
> 
> 
>># print without trailing newline
>>write(1, 2, 3)
> 
> 
> This violates this design principle:
> When there are two options and one is overwhelmingly more common in use (in 
> this case, with newline added, at least 95%) the common case should be 
> easier, not harder.

Having write/writeln as builtins has that problem too (with writeln being more
common, but having the less obvious and longer name), but that pair of
functions is still what is currently recorded in PEP 3000 as the candidate
replacement for the print statement.

Unfortunately, giving "write" the behaviour of "writeln" would result in a
confusing difference between "sys.stdout.write('Hello world!')" and
"write('Hello world!')", where the latter appends a trailing newline, but the
former doesn't.

I figure the naming of any replacement function for the print statement is
going to end up squarely in Guido's court, particularly given that the need
for a workable transition strategy makes it difficult to use the most obvious
name (i.e., print).

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.blogspot.com

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to