[Python-Dev] trunc()

Jeffrey Yasskin jyasskin at gmail.com
Sat Jan 26 23:42:01 CET 2008


On Jan 26, 2008 12:43 AM, Georg Brandl <g.brandl at gmx.net> wrote:
> That, and making int(float) == int(trunc(float)) seems like reasonable
> behavior to me as a person not involved in the discussion.

That's the only position in this discussion that I don't understand.
Although int() and trunc() would still have very slightly different
behaviors, they seem too close together (identical on most common
types) to be compatible with "only one way to do it". I've been
advocating trunc() under the assumption that int(float) would be
deprecated and eliminated as soon as practical (with an error message
similar to float(complex)). Could one of the people in favor of
keeping both explain why they think that's a good idea?

-- 
Namasté,
Jeffrey Yasskin


More information about the Python-Dev mailing list