Comment on PEP-0238

Paul Prescod paulp at ActiveState.com
Tue Jul 3 22:16:27 CEST 2001


I knew I shouldn't get dragged into this. :)

The problems with the current situation are well-documented. Every
Python book introduces this feature with a statement along the lines of:
"this is something that's going to be different than you expect...be
careful." It is one of Guido's oldest regrets. Arguing about it isn't
really going to change anything. Either someone will step up and do the
implementation, in which case the behaviour likely will change, as Guido
wants it to, or nobody ever will, in which case the status quo will
remain.

Donn Cave wrote:
> 
> Quoth Paul Prescod <paulp at ActiveState.com>:
> ...
> | Nobody argues against understanding. But understanding is eased if you
> | do what people expect. People believe that the integers are a special
> | case of floats. Python encourages them in that belief in most places
> | other than this one.
> 
> Integer is not a special case of float, they're both special cases
> of number.  Why not say integers are pure numbers and floats are
> corrupt, hence coercion favors the float because you can corrupt
> the pure easier than you can purify the corrupt?  
> ...
> 
> Floating point is just a can of worms.

I'll take that as a vote in favor of PEP 240. :)

http://python.sourceforge.net/peps/pep-0240.html

-- 
Take a recipe. Leave a recipe.  
Python Cookbook!  http://www.ActiveState.com/pythoncookbook




More information about the Python-list mailing list