[Python-3000] On PEP 3116: new I/O base classes
Benji York
benji at benjiyork.com
Wed Jun 20 03:11:03 CEST 2007
Gareth McCaughan wrote:
> On Tuesday 19 June 2007 19:47, Bill Janssen wrote:
>
>> The "seek" method on RawIOBase is awfully quaint and UNIX-y, what with
>> the "whence" argument. It could be made considerably more Pythonic by
>> splitting it into two methods:
>>
>> .seek(POS: int)
>>
>> where positive values for POS are from the beginning of the file, and
>> negative values of POS are from the end of the file, and
>>
>> .nudge(POS: int)
>>
>> where the value of POS, positive or negative, is from the current
>> location.
>
> Presumably this would go along with introducing a new "wink" method.
> I wonder what it would do. (Close the file briefly?)
That's a great idea! It can be called in response to a HUP to rotate
log files.
me.wink()-ly y'rs
--
Benji York
http://benjiyork.com
More information about the Python-3000
mailing list