[Python-Dev] py3k: print function treats sep=None and end=None in an unintuitive way (original) (raw)
Eric Smith eric+python-dev at trueblade.com
Tue Apr 8 15:40:26 CEST 2008
- Previous message: [Python-Dev] py3k: print function treats sep=None and end=None in an unintuitive way
- Next message: [Python-Dev] py3k: print function treats sep=None and end=None in an unintuitive way
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alessandro Guido wrote:
Can anybody please point me why print('a', 'b', sep=None, end=None) should produce "a b\n" instead of "ab"? I've read http://docs.python.org/dev/3.0/library/functions.html#print, pep-3105 and some ml threads but did not find a good reason justifying such a strange behaviour.
Thanks. -Alessandro Guido
Because None mean 'use the default value'. You probably want: print('a', 'b', sep='', end='')
- Previous message: [Python-Dev] py3k: print function treats sep=None and end=None in an unintuitive way
- Next message: [Python-Dev] py3k: print function treats sep=None and end=None in an unintuitive way
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]