This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bz2.open() docs give conflicting defaults for mode
Type: Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: roysmith, shreyanavigyan, xtreak
Priority: normal Keywords:

Created on 2021-04-16 18:16 by roysmith, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg391245 - (view) Author: Roy Smith (roysmith) Date: 2021-04-16 18:16
See https://docs.python.org/3.7/library/bz2.html

For bz2.open(), the section header says:

bz2.open(filename, mode='r' ...)

but the text says:

The mode argument ... The default is 'rb'.

As I understand it, 'r' and 'rb' actually do the same thing, but the docs should at least be consistent.
msg391246 - (view) Author: Shreyan Avigyan (shreyanavigyan) * Date: 2021-04-16 18:21
The documentation has been corrected in 3.9. Prior to 3.9 the header was bz2.open(filename, mode='r' ...). Now in 3.9 or later the header is bz2.open(filename, mode='rb' ...).
msg391268 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2021-04-17 02:34
This was fixed in https://github.com/python/cpython/pull/15100 and not backported.
History
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 88039
2021-04-17 02:34:09xtreaksetnosy: + xtreak
messages: + msg391268
2021-04-16 23:59:47ned.deilysetstatus: open -> closed
resolution: out of date
stage: resolved
2021-04-16 18:21:48shreyanavigyansetnosy: + shreyanavigyan
messages: + msg391246
2021-04-16 18:16:59roysmithcreate