@@ -1123,8 +1123,8 @@ are always available. They are listed here in alphabetical order.
1123
1123
(which on *some * Unix systems, means that *all * writes append to the end of
1124
1124
the file regardless of the current seek position). In text mode, if
1125
1125
*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
1128
1128
*encoding * unspecified.) The available modes are:
1129
1129
1130
1130
.. _filemodes :
@@ -1183,10 +1183,9 @@ are always available. They are listed here in alphabetical order.
1183
1183
1184
1184
*encoding * is the name of the encoding used to decode or encode the file.
1185
1185
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.
1190
1189
1191
1190
*errors * is an optional string that specifies how encoding and decoding
1192
1191
errors are to be handled—this cannot be used in binary mode.
0 commit comments