[Sorry for the dupes. Lesson: never try and send mail from a moving train.] Eric Smith wrote: > 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 means 'use the default value'. You probably want: > print('a', 'b', sep='', end='') > > >>> import io > >>> s = io.StringIO() > >>> print('a', 'b', end='', sep='', file=s) > >>> s.getvalue() > 'ab' > >>> > _______________________________________________ > Python-Dev mailing list > Python-Dev at python.org > http://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: http://mail.python.org/mailman/options/python-dev/eric%2Bpython-dev%40trueblade.com >
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4