8000 gh-124832: Add a note to indicate that `datetime.now` may return the … · python/cpython@760b1e1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 760b1e1

Browse files
spacemanspiff2007vstinnerpicnixz
authored
gh-124832: Add a note to indicate that datetime.now may return the same instant (#124834)
* Update datetime.rst * Update datetime.rst replace warning with note * Update Doc/library/datetime.rst Co-authored-by: Victor Stinner <vstinner@python.org> * Update Doc/library/datetime.rst Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --------- Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent c6127af commit 760b1e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Doc/library/datetime.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,10 @@ Other constructors, all class methods:
948948

949949
This function is preferred over :meth:`today` and :meth:`utcnow`.
950950

951+
.. note::
952+
953+
Subsequent calls to :meth:`!datetime.now` may return the same
954+
instant depending on the precision of the underlying clock.
951955

952956
.. classmethod:: datetime.utcnow()
953957

0 commit comments

Comments
 (0)
0