This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients berker.peksag, ezio.melotti, introom, martin.panter
Date 2015-09-10.23:18:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441927105.75.0.904617489862.issue25057@psf.upfronthosting.co.za>
In-reply-to
Content
I’m not sure this is a good idea. IOBase is a base class, so adding to its API really means everybody’s subclasses may need to be updated to support the proper keyword argument names. Even ignoring classes outside Python’s standard library, it looks like you would need to update BufferedReader, FileIO, etc.

What is the reason you want to add keyword argument support? See also Issue 8706 about doing this in general to other functions. I can think of one or two weak reasons why this might be useful:

* It allows swapping the arguments: file.seek(whence=SEEK_CUR, offset=+4) may be slightly more readable, because the offset has to be interpreted in the context of “whence”.

* It could allow usage like functools.partial(file.seek, whence=SEEK_CUR)(offset)

Also, making the offset default to zero might be useful for doing file.seek(whence=SEEK_END).

If we do go ahead with this, it would need documenting (version changed note), and test cases.
History
Date User Action Args
2015-09-10 23:18:25martin.pantersetrecipients: + martin.panter, ezio.melotti, berker.peksag, introom
2015-09-10 23:18:25martin.pantersetmessageid: <1441927105.75.0.904617489862.issue25057@psf.upfronthosting.co.za>
2015-09-10 23:18:25martin.panterlinkissue25057 messages
2015-09-10 23:18:25martin.pantercreate