You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when you call that method using colon slices, like what is used in Python indexes and works for slice only __get_item__, it gives the error "no matching method in call to 'getitem'".
As I believe this is a parser feature, my request is to add the capability to parse a list of mixed inputs of int and slice (specifically colon slices) into something that can be understood by type checking for *slices: Variant[Slice,Int].
What is your motivation for this change?
This will allow more pythonic indexing of multidimensional arrays, and nested objects. Having to manually create slices using Slice is cumbersome.Pythonic
Any other details?
No response
The text was updated successfully, but these errors were encountered:
Review Mojo's priorities
What is your request?
With the inclusion of
Variant
it is now possible to writeBut when you call that method using colon slices, like what is used in Python indexes and works for slice only
__get_item__
, it gives the error "no matching method in call to 'getitem'".As I believe this is a parser feature, my request is to add the capability to parse a list of mixed inputs of int and slice (specifically colon slices) into something that can be understood by type checking for
*slices: Variant[Slice,Int]
.What is your motivation for this change?
This will allow more pythonic indexing of multidimensional arrays, and nested objects. Having to manually create slices using
Slice
is cumbersome.PythonicAny other details?
No response
The text was updated successfully, but these errors were encountered: