Skip to content

Commit 12203d9

Browse files
committed
Docs: 'import datetime as dt' in examples
1 parent c5aa74d commit 12203d9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/whatsnew/3.8.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ For full details, see the :ref:`changelog <changelog>`.
5050

5151
.. testsetup::
5252

53-
from datetime import date
5453
from math import cos, radians
5554
from unicodedata import normalize
5655
import re
@@ -259,8 +258,9 @@ Added an ``=`` specifier to :term:`f-string`\s. An f-string such as
259258
``f'{expr=}'`` will expand to the text of the expression, an equal sign,
260259
then the representation of the evaluated expression. For example:
261260

261+
>>> import datetime as dt
262262
>>> user = 'eric_idle'
263-
>>> member_since = date(1975, 7, 31)
263+
>>> member_since = dt.date(1975, 7, 31)
264264
>>> f'{user=} {member_since=}'
265265
"user='eric_idle' member_since=datetime.date(1975, 7, 31)"
266266

0 commit comments

Comments
 (0)