Skip to content

Commit debbe14

Browse files
committed
edit doc
1 parent 3402d38 commit debbe14

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

Doc/library/calendar.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ interpreted as prescribed by the ISO 8601 standard. Year 0 is 1 BC, year -1 is
251251
3) specifies the number of months per row. *css* is the name for the
252252
cascading style sheet to be used. :const:`None` can be passed if no style
253253
sheet should be used. *encoding* specifies the encoding to be used for the
254-
output (defaulting to ``utf-8``).
254+
output (defaulting to ``'utf-8'``).
255255

256256
.. versionchanged:: next
257-
If *encoding* is None, utf-8 is used by default.
257+
If *encoding* is None, ``'utf-8'`` is used by default.
258258

259259
.. method:: formatmonthname(theyear, themonth, withyear=True)
260260

@@ -654,10 +654,9 @@ The following options are accepted:
654654

655655
The encoding to use for output.
656656
:option:`--encoding` is required if :option:`--locale` is set.
657-
Defaults to None.
658657

659658
.. versionchanged:: next
660-
If *encoding* is None, utf-8 is used by default.
659+
If no :option:`--encoding` is supplied, ``'utf-8'`` is used by default.
661660

662661
.. option:: --type {text,html}, -t {text,html}
663662

Doc/whatsnew/3.15.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ Improved modules
9292
calendar
9393
--------
9494

95-
* The default *encoding* parameter value in :meth:`calendar.HTMLCalendar.formatyearpage`
96-
is now utf-8.
95+
* The default *encoding* for `calendar.HTMLCalendar.formatyearpage` is ``'utf-8'``
96+
Previously, it defaulted to :func:`sys.getdefaultencoding`.
9797
(Contributed by Jiahao Li in :gh:`135001`.)
9898

9999

@@ -261,9 +261,8 @@ New features
261261
Porting to Python 3.15
262262
----------------------
263263

264-
* The default *encoding* parameter value in :meth:`calendar.HTMLCalendar.formatyearpage`
265-
is now utf-8.
266-
264+
* The default *encoding* for `calendar.HTMLCalendar.formatyearpage` is now ``'utf-8'``.
265+
Previously, it defaulted to :func:`sys.getdefaultencoding`.
267266
(Contributed by Jiahao Li in :gh:`135001`.)
268267

269268
* :class:`sqlite3.Connection` APIs has been cleaned up.

Lib/calendar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ def main(args=None):
846846
parser.add_argument(
847847
"-e", "--encoding",
848848
default=None,
849-
help="encoding to use for output (default utf-8)"
849+
help="encoding to use for output (default: 'utf-8')"
850850
)
851851
parser.add_argument(
852852
"-t", "--type",
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
The default *encoding* parameter value in
2-
:meth:`calendar.HTMLCalendar.formatyearpage` is now utf-8.
1+
The default *encoding* for :meth:`calendar.HTMLCalendar.formatyearpage` is now ``'utf-8'``.

0 commit comments

Comments
 (0)