mirror of https://github.com/python/cpython
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>
This commit is contained in:
parent
c6127af868
commit
760b1e103a
|
@ -948,6 +948,10 @@ Other constructors, all class methods:
|
||||||
|
|
||||||
This function is preferred over :meth:`today` and :meth:`utcnow`.
|
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()
|
.. classmethod:: datetime.utcnow()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue