New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of PEP 3102 Keyword Only Argument #43917
Comments
This patch is implementation of PEP-3102, keyword-only Important changes include
That's pretty much everything that's important, and the And my patch passes all regression tests excepts |
Logged In: YES import.c: comment has double word 'added'
compile.c:
in the compiler package, I didn't see a change to the change to regrtest.py doesn't seem necessary (just an there should be a lot more tests added for both positive and it's not good to comment out the tests in test_frozen. when you say it passes all tests, did you run with -u all? in the new test, i think you need to pass a name for the In testRaiseErrorWhenFuncall(), you can use you need a test_main for this test to be run from regrtest. |
Logged In: YES
I changed some tabs in ast_for_argument function to spaces -
Yup, it passes all the tests except test_frozen and
Yeah, I copied it from test_with.py, but now I'm passing a |
Logged In: YES Maybe I should mention that I've uploaded new patch that |
Logged In: YES The original patch crashes when a function has keyword only |
Logged In: YES General comment: I think you should update or add a comment There are a number of places where the code is wider than 79 E.g.: ceval.c:
ast.c: @@ -591,6 +591,63 @@ please follow the surrounding marshal.c: line 871 too long codeobject.c: several lines too long funcobject.c: too long at "non-dict keyword only default args"); Lib/compiler/*.py: several lines too long Modules/pyexpat.c: @@ -279,6 +279,7 @@ indentation error Modules/parsermodule.c: several lines too long; the loop at |
Logged In: YES The codeobject has a kwonlyargcount meaning the number of So, the signature changes from this to following. From python, you can access this with name |
Logged In: YES I made a big mistake with the grammar - currently, the |
Logged In: YES I see. The Grammar should simply make the NAME after the '*' |
Logged In: YES The new patch that I am uploading fixes the Grammar |
Logged In: YES Checked in as r52491. I'm keeping this open awaiting a patch for the compiler package. |
Now the compiler package works. The patch passes regrtest with "-u all" option and "-u compiler" option (except test_frozen.py). The patch is against latest p3yk branch HEAD. The last patch accidentally included some test code in test_compiler.py (and which is committed to the svn) so this patch includes fix for that. |
Submitted. Jiwon, can you mail me another copy of test_keywordinoyarg.py? I believe I lost it. |
All submitted. (test_keywordonlyarg.py too) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: