[issue4121] open(): use keyword only for arguments other than file and mode
STINNER Victor
report at bugs.python.org
Tue Oct 14 14:41:43 CEST 2008
STINNER Victor <victor.stinner at haypocalc.com> added the comment:
> Do you suggest that 'buffering' should be allowed
> as positional argument?
No, I would prefer to keep also two positional arguments: file and
mode. I hate open(filename, 'r', s): I don't know what is s, the
buffering or the encoding? And I think that beginner would also be
distribed by this third argument. Sometimes, it's easy to understand
the 3 arguments of a function, like re.match("[a-z]", t,
re.IGNORECASE). But for open(), I would prefer explicit arguments.
And so socket.makefile() should also be "fixed" to keep only 2
positional arguments.
It's my opinion and if you really want to keep compatibility with
Python2, keep the 3 positional arguments.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4121>
_______________________________________
More information about the Python-bugs-list
mailing list