[issue24536] os.pipe() should return a structsequence (or namedtuple.)

Jonathan Slenders report at bugs.python.org
Tue Jun 30 16:57:17 CEST 2015


Jonathan Slenders added the comment:

Niki Spahiev made a valid argument saying that the following code is common:

if not hasattr(src, 'read'): src = open(src)

This will break if we name it 'read'/'write'  like the methods of a file object.

----------

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


More information about the Python-bugs-list mailing list