[docs] [issue17003] Unification of read() and readline() argument names

Serhiy Storchaka report at bugs.python.org
Sun Jan 20 17:13:14 CET 2013


New submission from Serhiy Storchaka:

read() and readline() optional parameter which limit the amount of read data has different names in different classes. All this classes mimic (less or more) io classes. Keyword parameter name is a part of method specification. Therefore it will be good made all read() arguments names the same and all readline() arguments names the same (and be consistent with documentation and C implementation). At least we should choose most consistent name for new implementations. If existent C implementation of some method doesn't support keyword argument (all _io classes) or argument names in C and Python implementations are different then we are free to change this name without breaking existing code.

For example, read()'s parameter named as:

"n" in _pyio, zipfile, and io documentation;
"size" in gzip, bz2, imaplib, tarfile, codecs, mailbox;
"len" in ssl;
"wtd" or "totalwtd" in binhex;
"amt" in http/client;
"chars" in codecs;
"buffersize" in os.

readline()'s parameter named as:

"limit" in _pyio, zipfile, and io documentation;
"size" in gzip, bz2, codecs, mailbox, lzma.

----------
assignee: docs at python
components: Documentation, IO, Library (Lib)
messages: 180298
nosy: benjamin.peterson, christian.heimes, docs at python, hynek, pitrou, serhiy.storchaka, stutzbach
priority: normal
severity: normal
status: open
title: Unification of read() and readline() argument names
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17003>
_______________________________________


More information about the docs mailing list