gh-108202: Document calendar.Calendar.firstweekday#128566
gh-108202: Document calendar.Calendar.firstweekday#128566erlend-aasland merged 4 commits intopython:mainfrom
Conversation
eendebakpt
left a comment
There was a problem hiding this comment.
Looks good to me. Either 0-6 or 0--6 would be fine with me, but to be consistent: there is one more 0-6 in the file (for IllegalWeekdayError)
|
I noticed, but double dash is used for many other ranges in this file. Amending all of those can be left for another PR. |
|
|
||
| This property can also be set and read using | ||
| :meth:`~Calendar.setfirstweekday` and | ||
| :meth:`~Calendar.getfirstweekday` respectively. |
There was a problem hiding this comment.
It might be worth recommending usage of either the attribute or the methods, per the zen:
There should be one-- and preferably only one --obvious way to do it.
If you want though, I'm fine to leave it as is. I'm just being nitpicky :)
There was a problem hiding this comment.
I considered that, but I think the zen train already left the calendar module API :) IMO, a better approach would be to soft deprecate the set/get method pair.
|
Thanks @erlend-aasland for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…8566) (cherry picked from commit b3cbd8f) Co-authored-by: Erlend E. Aasland <[email protected]>
|
Thanks for the reviews, everyone! |
|
GH-128579 is a backport of this pull request to the 3.13 branch. |
…8566) (cherry picked from commit b3cbd8f) Co-authored-by: Erlend E. Aasland <[email protected]>
|
GH-128580 is a backport of this pull request to the 3.12 branch. |
…#128579) (cherry picked from commit b3cbd8f) Co-authored-by: Erlend E. Aasland <[email protected]>
…#128580) (cherry picked from commit b3cbd8f) Co-authored-by: Erlend E. Aasland <[email protected]>
Follow-up to #127579. I think we should promote the more pythonic property API, rather than the setter/getter pair.
📚 Documentation preview 📚: https://cpython-previews--128566.org.readthedocs.build/