Nick Coghlan wrote:
> So that print(a, b) does the right thing (i.e. matches the Python 2.x
> print statement's behaviour)
AFAICS print(a, b) does the right thing because default values of "sep" and
"end" are ' ' and '\n' respectively, doesn't it?
Eric Smith wrote:
> Because None means 'use the default value'. You probably want:
> print('a', 'b', sep='', end='')
I think this is a "not optimally designed" API
because you have to read the documentation to understand why
print('a', 'b', sep=None, end=None)
does not translate into the obvious:
«print strings 'a' and 'b' using no separator and no terminator»
but into:
«print strings 'a' and 'b' using the default separator and the default
terminator»
However i'll just cope with it, Python is still the best language ;)
Thank you all for replying!
-Alessandro Guido
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com