[Python-Dev] Rounding float to int directly (Re: struct module and coercing floats to integers)

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Aug 4 11:14:57 CEST 2006


James Y Knight wrote:

> And it does in C because C doesn't have arbitrary size integers, so  if 
> round returned integers, round(1e+308) couldn't work.

Also, in C you can use the result directly in an int
context without complaint. In Python these days, that
is usually disallowed.

--
Greg


More information about the Python-Dev mailing list