Why is str(None) == 'None' and not an empty string?

Terry Reedy tjreedy at udel.edu
Wed Aug 28 06:33:04 EDT 2013


On 8/28/2013 4:57 AM, Piotr Dobrogost wrote:

> Having repr(None) == 'None' is sure the right thing but why does str(None) == 'None'? Wouldn't it be more correct if it was an empty string?

No.
There is no reason to be different.

-- 
Terry Jan Reedy




More information about the Python-list mailing list