New submission from Philipp Freyer <philipp.fre...@dilcher.de>:
The documentation clearly states that bz2.open(mode='r') opens a file in binary mode. I would have to use 'rt' for text mode. The basic Python open(mode='r') method opens a file in text mode. This is how I would expect any open(mode='r') method to work, especially since the standard Python implementation of open() treats 'r' as a synonym to 'rt'. IMHO the behavior of bz2.open() is a possible pitfall for many developers and should be in line with the standard open() behavior. Sorry, if this is in the wrong place, I am happy to put this elsewhere. However, I do see that as a conceptual issue (in our case this bug was not found for years) ---------- messages: 387517 nosy: philipp.freyer priority: normal severity: normal status: open title: bz2.open modes behaving differently than standard open() modes type: behavior versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43297> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com