mirror of
https://github.com/davidhalter/parso.git
synced 2026-10-07 04:34:32 +08:00
Only apply non-default params logic prior to the star (fixes #161)
This commit is contained in:
1 parent
93206f6eba
commit
e5731d3932
3 files changed
+40
-6
No files matched your search
@@ -46,6 +46,28 @@ def x(b=a):
|
||||
global a
|
||||
|
||||
|
||||
def x(*args, c=2, d):
|
||||
pass
|
||||
|
||||
|
||||
def x(*, c=2, d):
|
||||
pass
|
||||
|
||||
|
||||
def x(a, b=1, *args, c=2, d):
|
||||
pass
|
||||
|
||||
|
||||
def x(a, b=1, *, c=2, d):
|
||||
pass
|
||||
|
||||
|
||||
lambda *args, c=2, d: (c, d)
|
||||
lambda *, c=2, d: (c, d)
|
||||
lambda a, b=1, *args, c=2, d: (c, d)
|
||||
lambda a, b=1, *, c=2, d: (c, d)
|
||||
|
||||
|
||||
*foo, a = (1,)
|
||||
*foo[0], a = (1,)
|
||||
*[], a = (1,)
|
||||
|
||||
Reference in new issue
Block a user