]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-124832: Add a note to indicate that `datetime.now` may return the same instant...
authorspacemanspiff2007 <10754716+spacemanspiff2007@users.noreply.github.com>
Tue, 8 Oct 2024 18:17:53 +0000 (20:17 +0200)
committerGitHub <noreply@github.com>
Tue, 8 Oct 2024 18:17:53 +0000 (11:17 -0700)
* 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>
Doc/library/datetime.rst

index 64510a77c67c118233064b02d5f4c8a0bb278243..f0b465bc9ce39cf8c5701bdbf780872461db0cc1 100644 (file)
@@ -948,6 +948,10 @@ Other constructors, all class methods:
 
    This function is preferred over :meth:`today` and :meth:`utcnow`.
 
+   .. note::
+
+      Subsequent calls to :meth:`!datetime.now` may return the same
+      instant depending on the precision of the underlying clock.
 
 .. classmethod:: datetime.utcnow()