Title: Document missing AST node constructor behavior changes in ast.rst for python 3.13 · Issue #140196 · python/cpython · GitHub
Open Graph Title: Document missing AST node constructor behavior changes in ast.rst for python 3.13 · Issue #140196 · python/cpython
X Title: Document missing AST node constructor behavior changes in ast.rst for python 3.13 · Issue #140196 · python/cpython
Description: Documentation In Python 3.13, AST node constructors now provide defaults for the omitted fields: Optional fields: default to None List fields: default to an empty list expr_context fields: default to Load() Previously in Python 3.12 and ...
Open Graph Description: Documentation In Python 3.13, AST node constructors now provide defaults for the omitted fields: Optional fields: default to None List fields: default to an empty list expr_context fields: default ...
X Description: Documentation In Python 3.13, AST node constructors now provide defaults for the omitted fields: Optional fields: default to None List fields: default to an empty list expr_context fields: default ...
Opengraph URL: https://github.com/python/cpython/issues/140196
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Document missing AST node constructor behavior changes in ast.rst for python 3.13","articleBody":"## Documentation\n\nIn Python 3.13, AST node constructors now provide defaults for the omitted fields:\n\n* Optional fields: default to `None`\n* List fields: default to an empty list\n* `expr_context` fields: default to `Load()`\n\nPreviously in Python 3.12 and earlier, these omitted fields would not exist as attributes, causing `AttributeError` when accessed.\n\nThese information can be found in [What’s New In Python 3.13](https://docs.python.org/3/whatsnew/3.13.html#ast), but not in the [`ast` documentation](https://docs.python.org/3/library/ast.html#) itself.\n\nSince this is a significant behavioral change, it should be documented in the `ast` module documentation with a `.. versionchanged:: 3.13` directive.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-140243\n* gh-146351\n* gh-146354\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/revdoor","@type":"Person","name":"revdoor"},"datePublished":"2025-10-16T08:13:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/140196/cpython/issues/140196"}
| 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:7ef90124-fbdc-be2d-f4f8-d4923742907a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8ABA:3F3AF6:56039BA:77CC82B:6A51093B |
| html-safe-nonce | 0163d0ae71bd5b08751efb4413f05d0f5399a7b74af8c8f487a9ef9115e03d84 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUJBOjNGM0FGNjo1NjAzOUJBOjc3Q0M4MkI6NkE1MTA5M0IiLCJ2aXNpdG9yX2lkIjoiMzQ4OTU3OTI0MzgwMDY5MzA1MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 698ecd205b01cff6cf52d846ee78eb834712fe0b2d7623b249fe5fc613868be6 |
| hovercard-subject-tag | issue:3520812590 |
| 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/140196/issue_layout |
| twitter:image | https://opengraph.githubassets.com/31861fa75abd31a34e6a7b653e31b190a5fc66b6ee2217b1e7b42aa6bb448afd/python/cpython/issues/140196 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/31861fa75abd31a34e6a7b653e31b190a5fc66b6ee2217b1e7b42aa6bb448afd/python/cpython/issues/140196 |
| og:image:alt | Documentation In Python 3.13, AST node constructors now provide defaults for the omitted fields: Optional fields: default to None List fields: default to an empty list expr_context fields: default ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | revdoor |
| hostname | github.com |
| expected-hostname | github.com |
| None | b076e100febaa00374cd89239f915d00dd3187f7c68b12bc2b7688181305344d |
| 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 | 2d129404fc45ea64edb1b98567c53e55b395536f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width