-
-
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
feature request: kwargs for getindex #25631
Comments
I've used things like |
Agree, this seems like a really bizarre misfeature request to me. The fact that indexing is lowered to a function call is incidental, indexing syntax is not function call syntax. |
I wanted to use this syntax for multidimensional arrays with "named" dimensions (as in the Python library xarray). So if |
That does seem more useful to me than doing an assignment inside an indexing expression ( |
I find that argument convincing. |
In function calls, we also allow e.g. |
Is this on the wrong milestone? |
No; for 0.7 we added a deprecation warning, and for 1.0 the new desired behavior (lowering to kwargs) needs to be added to replace it. |
Re-opening to track the possibility of adding this feature in 1.x now that the old behavior has been deprecated. |
It appears this feature was implemented in 1.0 as part of #28366: julia> dump(:(x[a=1]))
Expr
head: Symbol ref
args: Array{Any}((2,))
1: Symbol x
2: Expr
head: Symbol kw
args: Array{Any}((2,))
1: Symbol a
2: Int64 1 |
Current behavior is to treat
=
as assignment inside[]
But for consistency with
()
, I would like to have it parse as a kwcallCurrently, that has to be written:
which is much less nice.
The text was updated successfully, but these errors were encountered: