Commit 4c5e84d
* 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: Paul Ganssle <[email protected]>
1 parent d00c6a3 commit 4c5e84d
1 file changed
+10
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
654 | | - | |
| 653 | + | |
| 654 | + | |
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| |||
1274 | 1274 | | |
1275 | 1275 | | |
1276 | 1276 | | |
1277 | | - | |
1278 | | - | |
1279 | | - | |
1280 | | - | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
| |||
1849 | 1849 | | |
1850 | 1850 | | |
1851 | 1851 | | |
1852 | | - | |
1853 | | - | |
1854 | | - | |
1855 | | - | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
| 1855 | + | |
1856 | 1856 | | |
1857 | 1857 | | |
1858 | 1858 | | |
| |||
0 commit comments