Commit 449d045
* 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 d2d8862)
Co-authored-by: David Lowry-Duda <[email protected]>
Co-authored-by: Paul Ganssle <[email protected]>
1 parent 8159805 commit 449d045
1 file changed
+13
-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 | | |
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
663 | 666 | | |
664 | 667 | | |
665 | 668 | | |
| |||
1274 | 1277 | | |
1275 | 1278 | | |
1276 | 1279 | | |
1277 | | - | |
1278 | | - | |
1279 | | - | |
1280 | | - | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
1281 | 1284 | | |
1282 | 1285 | | |
1283 | 1286 | | |
| |||
1849 | 1852 | | |
1850 | 1853 | | |
1851 | 1854 | | |
1852 | | - | |
1853 | | - | |
1854 | | - | |
1855 | | - | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
| 1858 | + | |
1856 | 1859 | | |
1857 | 1860 | | |
1858 | 1861 | | |
| |||
0 commit comments