[Python-Dev] py3k: print function treats sep=None and end=None in an unintuitive way

Nick Coghlan ncoghlan at gmail.com
Tue Apr 8 19:15:58 CEST 2008


Alessandro Guido wrote:
> «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 ;)

I definitely recommend getting used to this idiom - None is used to 
indicate missing (i.e. 'use the default value') arguments in many more 
cases than just the print function.
Cheers,
Nick.
-- 
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
---------------------------------------------------------------
 http://www.boredomandlaziness.org


More information about the Python-Dev mailing list

AltStyle によって変換されたページ (->オリジナル) /