Skip to content

Commit 632f3d0

Browse files
[3.12] pythongh-115684: Clarify datetime replace documentation (pythonGH-116519)
* Clarify datetime `replace` documentation In pythonGH-115684, HopedForLuck noted that `datetime.date.replace()` documentation was confusing because it looked like it would be changing immutable objects. This documentation change specifies that the `replace()` methods in `datetime` return new objects. This uses similar wording to the documentation for `datetime.combine()`, which specifies that a new datetime is returned. This is also similar to wording for `string.replace()`, except `string.replace()` emphasizes that a "copy" is returned. Resolves pythonGH-115684. * Include reviewer comments Thanks Privat33r-dev for the comments! --------- (cherry picked from commit d2d8862) Co-authored-by: David Lowry-Duda <david@lowryduda.com> Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
1 parent e9a8afd commit 632f3d0

0 file changed

File tree

    0 commit comments

    Comments
     (0)