[New-bugs-announce] [issue7686] redundant open modes 'rbb', 'wbb', 'abb' no longer work on Windows

ivank report at bugs.python.org
Wed Jan 13 01:28:56 CET 2010

New submission from ivank <ivan at ludios.org>:

This probably only applies to Windows. The redundant 'b' modes still work on Linux.

These worked on Windows in 2.6.4:

open('test', 'rbb')
open('test', 'wbb')
open('test', 'abb')

and possibly others.

In 2.7a2, they throw ValueErrors like this:

>>> open('test', 'wbb')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Invalid mode ('wbb')

It would be nice if the old behavior were preserved for backwards compatibility. Some programs append a 'b' indiscriminately.

messages: 97674
nosy: ivank
severity: normal
status: open
title: redundant open modes 'rbb', 'wbb', 'abb' no longer work on Windows
type: behavior
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list