| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…repl
>>> def good(x, y): ...
... def bad(x, x): ...
File "<python-input-13>", line 2
def bad(x, x): ...
^
SyntaxError: duplicate argument 'x' in function definition
There was a problem hiding this comment.
I presume that this will be backported to 3.13. I would like the pyshell addition backported to 3.12 since I showsyntaxerror needs revision. If you don't, I will.
Sorry, something went wrong.
I'm not sure that referenced issue is important enough to do backport. The #121804 is not specific for the new repl. It's valid for the basic repl as well, long before 3.12.
I doubt it does make sense. Support for kwargs was silently added for showsyntaxerror() in #119318, it's not backported to 3.12. But in 3.13+, probably subclasses of InteractiveInterpreter should be adjusted to accept kwargs. This patch doesn't fix anything for IDLE, apart from this small incompatibility in interfaces. The referenced issue isn't valid for the IDLE - here always correct error locations are highlighted. |
Sorry, something went wrong.
| @@ -0,0 +1,3 @@ | |||
| Add new kwarg ``source`` for | |||
There was a problem hiding this comment.
We don't want to make this argument public so let's not mention it in the change log . Instead, mention what we are fixing in the repl
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe I should make it underscore-prefixed?
Sorry, something went wrong.
There was a problem hiding this comment.
Our experience is that if it appears in the signature, people will use it and then changing it will be more challenging. Also some times the underscore prefixed argument is used to avoid collision with keywords or other reserved identifiers.
Sorry, something went wrong.
There was a problem hiding this comment.
Our experience is that if it appears in the signature, people will use it and then changing it will be more challenging.
Yeah, I did a proposal to hide this per default: https://discuss.python.org/t/25543.
Also some times the underscore prefixed argument is used to avoid collision with keywords
I was thinking that it's pep8 violation. "it is generally better to append a single trailing underscore rather than use an abbreviation or spelling corruption." (c)
Sorry, something went wrong.
|
Thanks @skirpichev for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
|
Sorry, @skirpichev and @pablogsal, I could not cleanly backport this to 3.13 due to a conflict. cherry_picker 354d55eb1fa40f272419aa6459ee5d2c4804c8ea 3.13 |
Sorry, something went wrong.
|
Thanks a lot for your contribution @skirpichev 🚀 |
Sorry, something went wrong.
Seems the backport failed, do you mind following these instructions to open the 3.13 backport? |
Sorry, something went wrong.
|
On Mon, Aug 19, 2024 at 07:20:21AM -0700, Pablo Galindo Salgado wrote:
Sorry, ***@***.*** and ***@***.***, I could not cleanly backport
this to 3.13 due to a conflict. Please backport using [3]cherry_picker
on command line.
cherry_picker 354d55e 3.13
Seems the backport failed, do you mind following these instructions to
open the 3.13 backport?
Yes, I'll work on this if you think that issue worth fixing for 3.13.
|
Sorry, something went wrong.
…in new repl (pythonGH-121886) (cherry picked from commit 354d55e) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
|
GH-123148 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
|
GH-123366 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Notes: