This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2015年05月13日 14:07 by tcaswell, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| unpack_grammar.patch | tcaswell, 2015年05月13日 14:07 | review | ||
| Messages (2) | |||
|---|---|---|---|
| msg243087 - (view) | Author: Thomas Caswell (tcaswell) * | Date: 2015年05月13日 14:07 | |
On the current tip (changeset: 96023:4b5461dcd190) the following results in a syntax error
def test(a='a', b='b'):
print(a, b)
opta = dict()
optb = dict(a=1, b=2)
test(**(opta or {})) # <- works on all python
test(**optb or {}) # <- fails on current hg tip
This is suspected to be a result of https://hg.python.org/cpython/rev/a65f685ba8c0
This was reported as an issue against sphinx (https://github.com/sphinx-doc/sphinx/pull/1889) and I was redirected here.
As suggested by Robert Lehmann suggests the issue is https://hg.python.org/cpython/rev/a65f685ba8c0#l1.33 which should be `** test`. Making this change prevents the syntax error (patch attached).
|
|||
| msg243316 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年05月16日 13:45 | |
New changeset 38b2307372bf by Benjamin Peterson in branch 'default': allow test node after ** in calls (closes #24176) https://hg.python.org/cpython/rev/38b2307372bf |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:16 | admin | set | github: 68364 |
| 2015年05月16日 13:45:05 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg243316 resolution: fixed stage: resolved |
| 2015年05月13日 14:21:43 | yselivanov | set | nosy:
+ benjamin.peterson, yselivanov |
| 2015年05月13日 14:07:25 | tcaswell | create | |