None in string formatting

Jorge Godoy godoy at ieee.org
Tue Mar 8 15:00:30 EST 2005


rodney.maxwell at gmail.com writes:

> Was doing some string formatting, noticed the following:
> 
> >>> x = None
> >>> "%s" % x
> 'None'
> 
> Is there a reason it maps to 'None'? I had expected ''.

How would know, then, if there was no value at all or if it was an empty
string? 

-- 
Godoy.      <godoy at ieee.org>



More information about the Python-list mailing list