Title: gh-129545 Improve Syntax Error Message for Default Parameter Order by sharktide · Pull Request #130937 · python/cpython · GitHub
Open Graph Title: gh-129545 Improve Syntax Error Message for Default Parameter Order by sharktide · Pull Request #130937 · python/cpython
X Title: gh-129545 Improve Syntax Error Message for Default Parameter Order by sharktide · Pull Request #130937 · python/cpython
Description: Fixes and closes #129545
Overview:
The SyntaxError: parameter without a default follows parameter with a default error message has been modified to SyntaxError: positional parameter without a default follows parameter with a default to clarify error messages.
As mentioned in #129545
@smheidrich
Trying to define a function in which a positional parameter follows a parameter with a default value, we get a SyntaxError as expected:
>>> def f(a=1, b):
File "
Open Graph Description: Fixes and closes #129545 Overview: The SyntaxError: parameter without a default follows parameter with a default error message has been modified to SyntaxError: positional parameter without a defau...
X Description: Fixes and closes #129545 Overview: The SyntaxError: parameter without a default follows parameter with a default error message has been modified to SyntaxError: positional parameter without a defau...
Opengraph URL: https://github.com/python/cpython/pull/130937
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0fb6731c-307e-1569-6a0f-ac848ea9ecaf |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8FE2:2F98EE:73FEC50:9A6FCE7:6A5E010F |
| html-safe-nonce | cf1a6c8a259009163f1b6382bf0cbf6beee937f0090d2bed054696a8bc88aebb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkUyOjJGOThFRTo3M0ZFQzUwOjlBNkZDRTc6NkE1RTAxMEYiLCJ2aXNpdG9yX2lkIjoiODk5MTI5NTMyNzYzNTg5ODYzOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8a8279e2b6b4f0dfda5afceb1e185e4cf80fdff34d01f7edd459429d174d59f7 |
| hovercard-subject-tag | pull_request:2377593574 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python/cpython/pull/130937/files |
| twitter:image | https://avatars.githubusercontent.com/u/189873015?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/189873015?s=400&v=4 |
| og:image:alt | Fixes and closes #129545 Overview: The SyntaxError: parameter without a default follows parameter with a default error message has been modified to SyntaxError: positional parameter without a defau... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7c1de870f4c0eff05971cd22970403a1239a98dc1a35e52a43594f23fc4d546f |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e90635d4b07e4a20ff548df2e2bfea2179c6a3f3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width