IronLanguages / IronLanguages/ironpython3

some error messages in argument unpacking are different from CPython

Open
#1,161 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CPython compatibility
Dominant language
C#
Stars
2.8k
Forks
316
Avg merge
1d 9h
Merged PRs (30d)
1

Description

The following function calls both raise a SyntaxError:

def f(**kwargs): pass

f(**{'x': 3}, **{'x': 5}, y=2)
f(x=5, **{'x': 3}, **{'x': 2})

with the error message:

TypeError: function got multiple values for keyword argument 'x'

However, with CPython 3.6 both should have the following error message:

TypeError: f() got multiple values for keyword argument 'x'

Note: The difference is minor, but I'm reporting it because the exact wording of the error messages is checked in test_unpack_ex.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the argument-unpacking implementation and the test_unpack_ex tests mentioned in the issue. Compare the reported messages with CPython 3.6 behavior, then update the relevant error handling so both calls include the function name and confirm the exact wording in test_unpack_ex.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, python
Domain
compilers, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.