@@ -1123,8 +1123,8 @@ are always available. They are listed here in alphabetical order.
11231123 (which on *some * Unix systems, means that *all * writes append to the end of
11241124 the file regardless of the current seek position). In text mode, if
11251125 *encoding * is not specified the encoding used is platform-dependent:
1126- `` locale.getpreferredencoding(False) `` is called to get the current locale
1127- encoding. (For reading and writing raw bytes use binary mode and leave
1126+ :func: ` locale.getencoding() ` is called to get the current locale encoding.
1127+ (For reading and writing raw bytes use binary mode and leave
11281128 *encoding * unspecified.) The available modes are:
11291129
11301130 .. _filemodes :
@@ -1183,10 +1183,9 @@ are always available. They are listed here in alphabetical order.
11831183
11841184 *encoding * is the name of the encoding used to decode or encode the file.
11851185 This should only be used in text mode. The default encoding is platform
1186- dependent (whatever :func: `locale.getpreferredencoding ` returns), but any
1187- :term: `text encoding ` supported by Python
1188- can be used. See the :mod: `codecs ` module for
1189- the list of supported encodings.
1186+ dependent (whatever :func: `locale.getencoding ` returns), but any
1187+ :term: `text encoding ` supported by Python can be used.
1188+ See the :mod: `codecs ` module for the list of supported encodings.
11901189
11911190 *errors * is an optional string that specifies how encoding and decoding
11921191 errors are to be handled—this cannot be used in binary mode.
0 commit comments