A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-November/069950.html below:

[Python-Dev] Passing floats to file.seek

[Python-Dev] Passing floats to file.seek [Python-Dev] Passing floats to file.seekAnthony Baxter anthony at interlink.com.au
Sun Nov 12 16:23:08 CET 2006
On Sunday 12 November 2006 22:09, Fredrik Lundh wrote:
> Martin v. Löwis wrote:
> > Patch #1067760 deals with passing of float values to file.seek;
> > the original version tries to fix the current implementation
> > by converting floats to long long, rather than plain C long
> > (thus supporting files larger than 2GiB).

> > b) if not, should Python 2.6 just deprecate such usage,
> >    or outright reject it?
>
> Python 2.5 silently accepts (and truncates) a float that's within range,
> so a warning sounds like the right thing to do for 2.6.  note that read

I agree that a warning seems best. If someone (for whatever reason) is 
flinging floats around where they actually meant to have ints, going straight 
to an error from silently truncating and accepting it seems a little bit 
harsh. 

Anthony
-- 
Anthony Baxter     <anthony at interlink.com.au>
It's never too late to have a happy childhood.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4