On Wed, Aug 28, 2013 at 6:21 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Wed, 28 Aug 2013 01:57:16 -0700, Piotr Dobrogost wrote:
Hi!
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
On Wed, Aug 28, 2013 at 5:42 AM, Fabrice POMBET fp2...@gmail.com wrote:
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?
the point of str(obj) is to
On Thursday, August 29, 2013 12:55:36 PM UTC+2, Ian wrote:
On Wed, Aug 28, 2013 at 5:42 AM, Fabrice POMBET fp2...@gmail.com wrote:
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
On 29 August 2013 20:43, Ian Kelly ian.g.ke...@gmail.com wrote:
On Wed, Aug 28, 2013 at 6:21 AM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Wed, 28 Aug 2013 01:57:16 -0700, Piotr Dobrogost wrote:
Hi!
Having repr(None) == 'None' is sure the right thing but why does
On Thu, 29 Aug 2013 04:43:16 -0600, Ian Kelly wrote:
I've had many occasions where it would have been convenient for
str(None) to return the empty string, e.g. when exporting tabular data
that includes null values from a database to a spreadsheet. Generally
it's safe to just call str() on
On Fri, 30 Aug 2013 01:57:45 +, Steven D'Aprano wrote:
So while I don't doubt that it wouldn't be occasionally convenient to
map None to '' rather than 'None', I think it would be surprising and,
indeed, dangerous if it happened by default, since it would encourage
people to build up SQL
Hi!
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?
Regards
Piotr Dobrogost
--
http://mail.python.org/mailman/listinfo/python-list
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
--
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?
the point of str(obj) is to return a string containing the obj (a sequence of
characters if it is unbound
On Wed, 28 Aug 2013 01:57:16 -0700, Piotr Dobrogost wrote:
Hi!
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?
Why do you think an empty string is more correct? Would you expect
str([]) or
10 matches
Mail list logo