Comment on PEP-0238
Paul Prescod
paulp at ActiveState.com
Sun Jul 1 15:33:41 EDT 2001
I really don't want to go through this whole argument again (after all,
that's the point of PEPs) but when you were a child, you "just knew"
whether you meant truncating or float division. Python guesses based on
the types of the operands which is a poor choice in a dynamically typed
language that otherwise treats "5.0" as a more verbose alternate syntax
for "5":
for i in range(5.0):
print i
If Python were to always disallow integer/float coercion then users
would learn that and life would go on. Instead, it coerces in some
places and not others.
--
Take a recipe. Leave a recipe.
Python Cookbook! http://www.ActiveState.com/pythoncookbook
More information about the Python-list
mailing list