[issue16125] open accepts arbitrary mode strings as long as they contain U

Arfrever Frehtes Taifersar Arahesis report at bugs.python.org
Fri Apr 17 21:48:22 CEST 2015


Arfrever Frehtes Taifersar Arahesis added the comment:

Still reproducible with Python 2.7.10rc0 on GNU/Linux:

>>> open('/tmp/a', 'az')
<open file '/tmp/a', mode 'az' at 0x7f68b117e420>
>>> open('/tmp/a', 'rz')
<open file '/tmp/a', mode 'rz' at 0x7f68b117e4b0>
>>> open('/tmp/a', 'wz')
<open file '/tmp/a', mode 'wz' at 0x7f68b117e420>
>>> open('/tmp/a', 'zU')
<open file '/tmp/a', mode 'zU' at 0x7f68b117e4b0>

----------

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


More information about the Python-bugs-list mailing list