Division considered un-Pythonic (Re: Case-sensitivity: why -- or why not? (was Re: Damnation!))

Martijn Faassen m.faassen at vet.uu.nl
Tue May 30 19:33:19 EDT 2000


Huaiyu Zhu <hzhu at rocket.knowledgetrack.com> wrote:
> On 30 May 2000 11:04:50 GMT, Martijn Faassen <m.faassen at vet.uu.nl> wrote:
>>Question: why does nobody complain about the overloading of the '+' 
>>operator? After all, it works on both strings and numbers; and presumably
>>your code will fall apart at unsuspected points as well if you assume it
>>only deals with numbers. :)

> Two points worth considering:
> 1. The int to float conversion is often automatic: sqrt(2)
> 2. a/b produces different results based on type without warning.

Right, as I thought I wrote in the rest of my post. :)

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list