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:e448a289-bbb3-3256-dcf7-03eabc7bb0f1 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D6D8:43F78:971BBE9:CB55238:6A5E6FE1 |
| html-safe-nonce | 76937e8334b8526bd1b4c9c7f9f3332fa3f46a1b672c54ccfc4ca1cde187596c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkQ4OjQzRjc4Ojk3MUJCRTk6Q0I1NTIzODo2QTVFNkZFMSIsInZpc2l0b3JfaWQiOiIzNjc2NTc4OTExNTI4ODQxMTg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 62a41ecb70ee1e0a947646c0305776a608c5a364e0c5413c36e5b9e03ce9bac1 |
| 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 | 71950bbe6bf7e15662b868c102fed9d1682c29a05970d9b2daa2e4dd3522c52e |
| 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 | 7514606601325843bc1c464d2d8bf5fe9af2c154 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width