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/2009-September/092160.html below:

[Python-Dev] Fuzziness in io module specs

[Python-Dev] Fuzziness in io module specs - PEP update proposition V2 [Python-Dev] Fuzziness in io module specs - PEP update proposition V2Guido van Rossum guido at python.org
Sun Sep 27 23:24:52 CEST 2009
On Sun, Sep 27, 2009 at 4:33 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>> So here is the proposed semantic, which matches established conventions:
>>
>> *IOBase.truncate(n: int = None) -> int*
> [...]
>
> I still don't think there is a sufficient benefit in breaking
> compatibility. If you want the file pointer to remain the same, you can
> save it first and restore it afterwards manually.

What compatibility, though? f.truncate() behaves different in 2.x than
in 3.x, and in 2.x it seems to match the POSIX semantics (i.e. the
seek position is unchanged even though the file size is). Perhaps the
changed semantics was an oversight or a mistake?

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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