Title: Missing error: "parameter without a default follows parameter with a default" with a function that uses `*args` · Issue #129810 · python/cpython · GitHub
Open Graph Title: Missing error: "parameter without a default follows parameter with a default" with a function that uses `*args` · Issue #129810 · python/cpython
X Title: Missing error: "parameter without a default follows parameter with a default" with a function that uses `*args` · Issue #129810 · python/cpython
Description: Bug report Bug description: Hey there, I don't know if that's a bug or if that's expected behavior, but since it's weird I might as well get this checked out. >>> def f(*args, a = 0, b): pass ... >>> def f(a = 0, b): pass File " Open Graph Description: Bug report Bug description: Hey there, I don't know if that's a bug or if that's expected behavior, but since it's weird I might as well get this checked out. >>> def f(*args, a = 0, b): pass ... >...
X Description: Bug report Bug description: Hey there, I don't know if that's a bug or if that's expected behavior, but since it's weird I might as well get this checked out. >>> def f(*ar...
Opengraph URL: https://github.com/python/cpython/issues/129810
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing error: \"parameter without a default follows parameter with a default\" with a function that uses `*args`","articleBody":"# Bug report\n\n### Bug description:\n\nHey there,\n\nI don't know if that's a bug or if that's expected behavior, but since it's weird I might as well get this checked out.\n```python\n\u003e\u003e\u003e def f(*args, a = 0, b): pass\n... \n\u003e\u003e\u003e def f(a = 0, b): pass\n File \"\u003cpython-input-1\u003e\", line 1\n def f(a = 0, b): pass\n ^\nSyntaxError: parameter without a default follows parameter with a default\n```\nI clearly understand the error here as it is not the first time I'm using Python, the thing that eludes me is: **why is there no error with the first function ?**\n\nThank you for your help !\n\n### CPython versions tested on:\n\n3.13\n\n### Operating systems tested on:\n\nLinux","author":{"url":"https://github.com/adrien-lsh","@type":"Person","name":"adrien-lsh"},"datePublished":"2025-02-07T15:00:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/129810/cpython/issues/129810"}
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:b2351583-010d-c667-f0b6-fd69eaa8c769 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id CA9E:269996:75ABBC:9A34DD:6A5C0C70 html-safe-nonce c94f4da57c6230f388d54e823c1c9f52885fea671136174952de2a50763bc8d1 visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTlFOjI2OTk5Njo3NUFCQkM6OUEzNEREOjZBNUMwQzcwIiwidmlzaXRvcl9pZCI6IjMyNzkwNjQ0MjgyNjUwODE5NjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== visitor-hmac b74381c83dd7807c3dd100521114f75b36c5f71ee0c7b973aec4b45e96ead26e hovercard-subject-tag issue:2838381124 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/129810/issue_layout twitter:image https://opengraph.githubassets.com/7b5266b1ff4f63e04f262bd2d8ec2a816c7c34992885e03bb8d55cc9a2d070a3/python/cpython/issues/129810 twitter:card summary_large_image og:image https://opengraph.githubassets.com/7b5266b1ff4f63e04f262bd2d8ec2a816c7c34992885e03bb8d55cc9a2d070a3/python/cpython/issues/129810 og:image:alt Bug report Bug description: Hey there, I don't know if that's a bug or if that's expected behavior, but since it's weird I might as well get this checked out. >>> def f(*args, a = 0, b): pass ... >... og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username adrien-lsh hostname github.com expected-hostname github.com None 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b 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 9c975978430e9ad293956f2bbdaf153b1bd84a99 ui-target canary-1 theme-color #1e2327 color-scheme light dark
URLs of crawlers that visited me.