Michael Chermside wrote:

> Providing both operations is a no-brainer. But only one gets to be
> spelled "x % y".

Personally I wouldn't mind if *neither* operation on
floats were spelled x % y. The number of times I can
remember doing a mod on floats is vanishingly small,
and I'd never be able to remember exactly how the one
chosen for % worked anyway. So giving them both explicit
names would be the most helpful thing for me.

> Beginners will care that floats and integers
> behave "the same"

To my mind, % is inherently an integer operation, and
doing the "same" thing for floats doesn't even make
sense. Raising an exception would be a good way of
giving newbies a gentle hint that they need to be more
explicit.

--
Greg
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to