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.

Author tcaswell
Recipients tcaswell
Date 2015-05-13.14:07:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1431526045.58.0.199670957567.issue24176@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2015-05-13 14:07:25tcaswellsetrecipients: + tcaswell
2015-05-13 14:07:25tcaswellsetmessageid: <1431526045.58.0.199670957567.issue24176@psf.upfronthosting.co.za>
2015-05-13 14:07:25tcaswelllinkissue24176 messages
2015-05-13 14:07:25tcaswellcreate