mirror of
https://github.com/python/cpython.git
synced 2025-11-20 19:06:50 +00:00
#5820: fix bug in usage of getreader().
This commit is contained in:
parent
f13447f3f7
commit
49cc4eafcb
1 changed files with 1 additions and 1 deletions
|
|
@ -174,7 +174,7 @@ Basic Usage
|
||||||
If the contents of *fp* are encoded with an ASCII based encoding other than
|
If the contents of *fp* are encoded with an ASCII based encoding other than
|
||||||
UTF-8 (e.g. latin-1), then an appropriate *encoding* name must be specified.
|
UTF-8 (e.g. latin-1), then an appropriate *encoding* name must be specified.
|
||||||
Encodings that are not ASCII based (such as UCS-2) are not allowed, and
|
Encodings that are not ASCII based (such as UCS-2) are not allowed, and
|
||||||
should be wrapped with ``codecs.getreader(fp)(encoding)``, or simply decoded
|
should be wrapped with ``codecs.getreader(encoding)(fp)``, or simply decoded
|
||||||
to a :class:`unicode` object and passed to :func:`loads`.
|
to a :class:`unicode` object and passed to :func:`loads`.
|
||||||
|
|
||||||
*object_hook* is an optional function that will be called with the result of
|
*object_hook* is an optional function that will be called with the result of
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue