Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
I don't thinkSyntaxError: iterable argument unpacking follows keyword argument unpacking should be present in a case like this (minimal reproducible example):
>>>func(t,*:)File"<stdin>",line1func(t,*:)^SyntaxError:iterableargumentunpackingfollowskeywordargumentunpacking
So it seems like if* is followed by code that triggers a genericSyntaxError: invalid syntax error, the former error triggers and overshadows the generic error. This has somewhat made checking the error in the expression following that* a bit harder.
I have another question.func(a=5, *b) is apparently allowed but from the errorfunc(**{'a': 7}, *b) isn't? I don't know what the PEP is for this so I'll try to search it up later.
CPython versions tested on:
3.12
Operating systems tested on:
Windows