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/2004-December/050523.html below:

[Python-Dev] Patches: 1 for the price of 10.

[Python-Dev] Patches: 1 for the price of 10. [Python-Dev] Patches: 1 for the price of 10.Bob Ippolito bob at redivi.com
Thu Dec 23 07:18:33 CET 2004
On Dec 23, 2004, at 12:36 AM, Timothy Fitz wrote:

>> 1067760 -- float-->long conversion on fileobj.seek calls, rather than
>>        float-->int.  Permits larger floats (2.0**62) to match large
>>        int (2**62) arguments.  rhettinger marked as "won't fix" in
>>        the original bug report; this seems like a clean solution,
>>        tho.  Recommend apply.
>
> Wouldn't this cause subtle errors when the float -> long conversion is
> no longer precise? Or is this a non issue because it could only happen
> when seeking on impossibly large files?

I think that Raymond marked as "won't fix" because automatic float -> 
integer conversion has been deprecated since Python 2.3.0 (if not 
earlier), for exactly the reason you state.  It's dumb.

 >>> range(2.7)
__main__:1: DeprecationWarning: integer argument expected, got float
[0, 1]

Apparently file.seek doesn't have this DeprecationWarning though..  
Strange, that.
 >>> f.seek(3.6)
 >>> f.tell()
3L

-bob

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