Title: calendar.setfirstweekday() documented parameter name does not match the implementation · Issue #153853 · python/cpython · GitHub
Open Graph Title: calendar.setfirstweekday() documented parameter name does not match the implementation · Issue #153853 · python/cpython
X Title: calendar.setfirstweekday() documented parameter name does not match the implementation · Issue #153853 · python/cpython
Description: Documentation https://docs.python.org/3/library/calendar.html#calendar.setfirstweekday documents the module-level function as setfirstweekday(weekday), but the implementation in Lib/calendar.py is def setfirstweekday(firstweekday). The p...
Open Graph Description: Documentation https://docs.python.org/3/library/calendar.html#calendar.setfirstweekday documents the module-level function as setfirstweekday(weekday), but the implementation in Lib/calendar.py is ...
X Description: Documentation https://docs.python.org/3/library/calendar.html#calendar.setfirstweekday documents the module-level function as setfirstweekday(weekday), but the implementation in Lib/calendar.py is ...
Opengraph URL: https://github.com/python/cpython/issues/153853
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"calendar.setfirstweekday() documented parameter name does not match the implementation","articleBody":"### Documentation\n\nhttps://docs.python.org/3/library/calendar.html#calendar.setfirstweekday documents the module-level function as `setfirstweekday(weekday)`, but the implementation in `Lib/calendar.py` is `def setfirstweekday(firstweekday)`. The parameter can be passed by keyword, so the documented signature fails:\n\n```pycon\n>>> import calendar\n>>> calendar.setfirstweekday(weekday=calendar.SUNDAY)\nTraceback (most recent call last):\n ...\nTypeError: setfirstweekday() got an unexpected keyword argument 'weekday'\n>>> calendar.setfirstweekday(firstweekday=calendar.SUNDAY) # OK\n```\n\nThe fix is to change the documented signature to `setfirstweekday(firstweekday)`, matching the code and the already-correct `Calendar.setfirstweekday(firstweekday)` entry in the same document. I have a PR ready: #153851.\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-153851\n* gh-153859\n* gh-153861\n* gh-153860\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/IbrahimShaqqou","@type":"Person","name":"IbrahimShaqqou"},"datePublished":"2026-07-17T16:52:26Z","url":"https://github.com/python/cpython/issues/153853"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5a161c3d-088d-1538-9293-d424250b1d2a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FF6:156DAE:3AFF07:51500B:6AECCA4F |
| html-safe-nonce | 2240cbfda07f406037d90d55fd68daf65be3ca8e0b15cf944d8a7cff6789b818 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkY2OjE1NkRBRTozQUZGMDc6NTE1MDBCOjZBRUNDQTRGIiwidmlzaXRvcl9pZCI6IjE0NzIwMzYyNDUwNTM2ODgzOTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1b80f36940277aeb4477d1c7117e295fc5da0f993fb1921524adf85a0659539c |
| hovercard-subject-tag | issue:4913237173 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/153853/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5f522fab1465ebff608077f9205b0cd4aac0b79e0d86280beb6f092f8f8e3796/python/cpython/issues/153853 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5f522fab1465ebff608077f9205b0cd4aac0b79e0d86280beb6f092f8f8e3796/python/cpython/issues/153853 |
| og:image:alt | Documentation https://docs.python.org/3/library/calendar.html#calendar.setfirstweekday documents the module-level function as setfirstweekday(weekday), but the implementation in Lib/calendar.py is ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | IbrahimShaqqou |
| hostname | github.com |
| expected-hostname | github.com |
| None | dc0b519c5798dc1150b88dc4c06a8b9634d0069218dc04e469970e76aad74016 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | db139f0bf57b59bf9a8c4abb0849924d6c6ca559 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width