Commit Graph

6 Commits

Author SHA1 Message Date
Christopher Yeh 5eec58a9e5
Fix date.__repr__() docstring (#109422) 2023-09-15 15:05:19 +02:00
Mikhail Samylov 60a9eea3f5
Docs: Fix typo in datetime.tzinfo docstring (#107257)
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-09-06 21:29:46 +00:00
Serhiy Storchaka 6f3c138dfa
gh-108751: Add copy.replace() function (GH-108752)
It creates a modified copy of an object by calling the object's
__replace__() method.

It is a generalization of dataclasses.replace(), named tuple's _replace()
method and replace() methods in various classes, and supports all these
stdlib classes.
2023-09-06 23:55:42 +03:00
William Andrea d5c5d4bfd3
gh-106392: Fix inconsistency in deprecation warnings (#106436)
They used "datetime" to refer to both the object and the module.
2023-09-01 22:31:21 +00:00
Paul Ganssle 0a5cd984b2 GH-84976: Re-introduce `datetime.py` and fix reprs
Without the change to the reprs, pure-python classes would have a repr
of `datetime._pydatetime.time`, etc.
2023-05-03 03:09:45 -06:00
Paul Ganssle 65c4a2b326 GH-84976: Move Lib/datetime.py to Lib/_pydatetime
This breaks the tests, but we are keeping it as a separate commit so
that the move operation and editing of the moved files are separate, for
a cleaner history.
2023-05-03 03:09:45 -06:00