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
http://mail.python.org/mailman/listinfo/python-dev
[-python-checkins, +python-dev]
On 2/22/07, Jim Jewett <[EMAIL PROTECTED]> wrote:
> > __setitem__
> > __setslice__
> > append
> > count
> > +decode
> > +endswith
> > extend
> > +find
> > index
> > insert
> > +
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:
> http://docs.
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 nume
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
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 inconsisen
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)))
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 stringif
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 cons
Jonathan Lange wrote:
> On 2/23/07, Neal Becker <[EMAIL PROTECTED]> wrote:
>> >>> bool ('False')
>> True
>>
>
> Non-empty strings are considered True, empty strings are considered
> False. This is not a wart, as the behaviour matches that of other
> sequences.
>
Well consider this:
>>>str (4)
'
On 2/23/07, Neal Becker <[EMAIL PROTECTED]> wrote:
> >>> bool ('False')
> True
>
Non-empty strings are considered True, empty strings are considered
False. This is not a wart, as the behaviour matches that of other
sequences.
cheers,
jml
___
Python-Dev
>>> 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
> What is the license for the decimal module,
> and is said license compatible
> with the BSD license that Django uses?
It is the the same license as Python itself:
http://www.python.org/psf/license/
> Are the authors of the decimal module OK
> with usdistributing it with Django?
You don't ne
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 tha
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 pr
15 matches
Mail list logo