| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -44,12 +44,13 @@ class BZ2File(io.BufferedIOBase): | |||
| 44 | 44 | def __init__(self, filename, mode="r", buffering=None, compresslevel=9): | |
| 45 | 45 | """Open a bzip2-compressed file. | |
| 46 | 46 | ||
| 47 | - If filename is a str or bytes object, is gives the name of the file to | ||
| 48 | - be opened. Otherwise, it should be a file object, which will be used to | ||
| 49 | - read or write the compressed data. | ||
| 47 | + If filename is a str or bytes object, it gives the name | ||
| 48 | + of the file to be opened. Otherwise, it should be a file object, | ||
| 49 | + which will be used to read or write the compressed data. | ||
| 50 | 50 | ||
| 51 | - mode can be 'r' for reading (default), 'w' for (over)writing, or 'a' for | ||
| 52 | - appending. These can equivalently be given as 'rb', 'wb', and 'ab'. | ||
| 51 | + mode can be 'r' for reading (default), 'w' for (over)writing, | ||
| 52 | + or 'a' for appending. These can equivalently be given as 'rb', | ||
| 53 | + 'wb', and 'ab'. | ||
| 53 | 54 | ||
| 54 | 55 | buffering is ignored. Its use is deprecated. | |
| 55 | 56 | ||
@@ -439,20 +440,20 @@ def open(filename, mode="rb", compresslevel=9, | |||
| 439 | 440 | encoding=None, errors=None, newline=None): | |
| 440 | 441 | """Open a bzip2-compressed file in binary or text mode. | |
| 441 | 442 | ||
| 442 | - The filename argument can be an actual filename (a str or bytes object), or | ||
| 443 | - an existing file object to read from or write to. | ||
| 443 | + The filename argument can be an actual filename (a str or bytes | ||
| 444 | + object), or an existing file object to read from or write to. | ||
| 444 | 445 | ||
| 445 | - The mode argument can be "r", "rb", "w", "wb", "a" or "ab" for binary mode, | ||
| 446 | - or "rt", "wt" or "at" for text mode. The default mode is "rb", and the | ||
| 447 | - default compresslevel is 9. | ||
| 446 | + The mode argument can be "r", "rb", "w", "wb", "a" or "ab" for | ||
| 447 | + binary mode, or "rt", "wt" or "at" for text mode. The default mode | ||
| 448 | + is "rb", and the default compresslevel is 9. | ||
| 448 | 449 | ||
| 449 | - For binary mode, this function is equivalent to the BZ2File constructor: | ||
| 450 | - BZ2File(filename, mode, compresslevel). In this case, the encoding, errors | ||
| 451 | - and newline arguments must not be provided. | ||
| 450 | + For binary mode, this function is equivalent to the BZ2File | ||
| 451 | + constructor: BZ2File(filename, mode, compresslevel). In this case, | ||
| 452 | + the encoding, errors and newline arguments must not be provided. | ||
| 452 | 453 | ||
| 453 | 454 | For text mode, a BZ2File object is created, and wrapped in an | |
| 454 | - io.TextIOWrapper instance with the specified encoding, error handling | ||
| 455 | - behavior, and line ending(s). | ||
| 455 | + io.TextIOWrapper instance with the specified encoding, error | ||
| 456 | + handling behavior, and line ending(s). | ||
| 456 | 457 | ||
| 457 | 458 | """ | |
| 458 | 459 | if "t" in mode: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments