Peter added the comment:
A workaround for my use case is even simpler, something like this:
try:
handle = gzip.open(filename, "rt")
except ValueError:
# Workaround for Python 2.7 under Windows
handle = gzip.open(filename, "r")
However, even this is troublesome for use in documentation intended to work on
Python 2 and 3, over Linux, Mac and Windows.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue30012>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com