diff options
| author | David Lowry-Duda <david@lowryduda.com> | 2025-04-08 08:30:12 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-08 08:30:12 (GMT) |
| commit | 4c5e84dbbe1eb0e7d0022a229e1bb3f81025b231 (patch) | |
| tree | 119371af8a61797d6e865af9f022ab98a9d7253f /Python/Python-tokenize.c | |
| parent | d00c6a3c6397b0cc5057086ace91930f5507a32e (diff) | |
| download | cpython-4c5e84dbbe1eb0e7d0022a229e1bb3f81025b231.zip cpython-4c5e84dbbe1eb0e7d0022a229e1bb3f81025b231.tar.gz cpython-4c5e84dbbe1eb0e7d0022a229e1bb3f81025b231.tar.bz2 | |
[3.12] gh-115684: Clarify datetime `replace` documentation (GH-116519) (#131694)
* Clarify datetime `replace` documentation
In GH-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 GH-115684.
* Include reviewer comments
Thanks Privat33r-dev for the comments!
---------
(cherry picked from commit d2d886215cf694d5f3e7f0cbd76507a96bac322b)
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
Diffstat (limited to 'Python/Python-tokenize.c')
0 files changed, 0 insertions, 0 deletions
