Sir/Madam
I seek help from designers, developers, testers,defect fixers,project
managers or playing any other key role in Free/Open Source software
development or maintenence
in carrying out a study to identify practices and problems of defect
management in various Free/Open Source Software
Apologies if this is a little off-topic for python-dev, but it seemed
like the best place to ask and get the attention of those needed.
I am championing a patch to improve Django's support for numeric types
by using Decimals with numeric columns and floats with double
precision columns, rather
int ('4')
4
bool ('False')
True
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
On 2/22/07, Neal Becker [EMAIL PROTECTED] wrote:
Well consider this:
str (4)
'4'
int(str (4))
4
str (False)
'False'
bool(str(False))
True
Doesn't this seem a bit inconsisent?
Virtually no python objects accept a stringified version of themselves
in their constructor:
str({})
'{}'
Mike Klaas wrote:
On 2/22/07, Neal Becker [EMAIL PROTECTED] wrote:
Well consider this:
str (4)
'4'
int(str (4))
4
str (False)
'False'
bool(str(False))
True
Doesn't this seem a bit inconsisent?
Virtually no python objects accept a stringified version of themselves
in their
On 2/22/07, Neal Becker [EMAIL PROTECTED] wrote:
Except, all the numeric types do, including int, float, and complex. But
not bool.
Oh?
In [5]: str(complex(1, 2))
Out[5]: '(1+2j)'
In [6]: complex(str(complex(1, 2)))
---
On 2/22/07, Neal Becker [EMAIL PROTECTED] wrote:
Mike Klaas wrote:
On 2/22/07, Neal Becker [EMAIL PROTECTED] wrote:
Well consider this:
str (4)
'4'
int(str (4))
4
str (False)
'False'
bool(str(False))
True
Doesn't this seem a bit inconsisent?
Virtually no python objects accept a
Neal Becker wrote:
Instead, bool fails in _the worst possible way_: it silently gives a
_wrong result_.
I disagree with the word fail there; Python is working correctly. The
behavior of converting expressions to a boolean is well-defined:
http://docs.python.org/ref/Booleans.html
Perhaps
Neal Becker writes:
Well consider this:
str (4)
'4'
int(str (4))
4
str (False)
'False'
bool(str(False))
True
Doesn't this seem a bit inconsisent?
The former case is a *conversion* from an expression that *does not*
have an interpretation in a numerical context to an
Larry Hastings wrote:
Neal Becker wrote:
Instead, bool fails in _the worst possible way_: it silently gives a
_wrong result_.
I disagree with the word fail there; Python is working correctly. The
behavior of converting expressions to a boolean is well-defined:
[-python-checkins, +python-dev]
On 2/22/07, Jim Jewett [EMAIL PROTECTED] wrote:
__setitem__
__setslice__
append
count
+decode
+endswith
extend
+find
index
insert
+join
+
This won't change so just get used to it. Please move any further
discussion to c.l.py.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
12 matches
Mail list logo