-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
I can enter the same keyword argument twice, and the second over-rules the first #16937
Comments
It seems pretty reasonable to make this a syntax error. |
As mentioned on the list, the current behavior might be useful with splatting for something like |
Somewhat relevant discussion in #4916 |
+1 for making it a syntax error.
|
give a syntax error for repeated keyword args. fixes #16937
A short example:
I'm on v0.4, but I asked about it on the julia-users list here, and was told you can still do this in v0.5. The link also contains an argument for why this might be considered a feature and not a bug. Personally, it feels more like a bug to me - but I am a very small voice.
I stumbled onto this when typing out several keyword arguments, and my mind was still on the previous keyword as I typed the next one, and so I accidentally typed it twice. Easy to do, and it took me quite a while to work out where I'd gone wrong.
The text was updated successfully, but these errors were encountered: