What is up with "=="?
Bengt Richter
bokr at oz.net
Mon Oct 13 07:25:25 EDT 2003
On Fri, 10 Oct 2003 11:14:14 -0400, mwilson at the-wire.com (Mel Wilson) wrote:
>In article <bm4u7q$74g$0 at 216.39.172.122>, bokr at oz.net (Bengt Richter) wrote:
>> coerce(...)
>> coerce(x, y) -> None or (x1, y1)
>>
>> When x and y can be coerced to values of the same type, return a tuple
>> containing the coerced values. When they can't be coerced, return None.
>>
>> >>> coerce(2,'2')
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in ?
>> TypeError: number coercion failed
>>
>>Bad doc string or misimplementation? Or is it fixed in the latest release, (which I
>>haven't gotten around to installing yet)?
>
>Otherwise, wouldn't it imply that 2+'3' came out to 5 or '23'?
>
I was referring to the documented "return None" vs. the fact that it raised an exception.
Regards,
Bengt Richter
More information about the Python-list
mailing list