Message387517
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) |
|
Date |
User |
Action |
Args |
2021-02-22 17:03:22 | philipp.freyer | set | recipients:
+ philipp.freyer |
2021-02-22 17:03:22 | philipp.freyer | set | messageid: <1614013402.3.0.966797647642.issue43297@roundup.psfhosted.org> |
2021-02-22 17:03:22 | philipp.freyer | link | issue43297 messages |
2021-02-22 17:03:22 | philipp.freyer | create | |
|