Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dict unpacking with two unpacked arguments fails #2086

Closed
daviskirk opened this issue Sep 2, 2016 · 4 comments
Closed

Dict unpacking with two unpacked arguments fails #2086

daviskirk opened this issue Sep 2, 2016 · 4 comments

Comments

@daviskirk
Copy link

This is valid (and pretty usefull) syntax in python 3.5:

dict(**{'a': 1}, **{'b': 2})

But mypy gives you an error:

error: Parse error before **

Note that this is different than #704 as it only describes a single unpacked argument. This is present in Mypy 0.4.4 as well as the git version as of today.

@daviskirk
Copy link
Author

I just noticed that running mypy with --fast-parser does not throw the same error. Is this the intended behaviour?

@Michael0x2a
Copy link
Collaborator

It is, yeah -- the fast parser is generally more feature-complete and less buggy then the current parser. For example, async/await is supported only by the fast parser, there are some bugs that appear only when using the old parser, etc.

The plan is to switch to using the fast parser by default and get rid of the current parser once we figure out how to get the fast parser (which is largely written in C) to compile on Windows.

@gvanrossum
Copy link
Member

This can be closed once the fast parser is the default.

@gvanrossum
Copy link
Member

I'm going to close this as a won't fix because the new parser will solve this and we're not going to put any work in the old parser/lexer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants