-
Notifications
You must be signed in to change notification settings - Fork 20
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
support size of list or dict using ()
#188
Comments
The first example looks OK but the second starts to look a bit complicated. I don't understand what the last one does! (List with 5 or 6 elements that must be dicts... wait: The use case seems valid but it we need to avoid confusing/ambiguous syntax, e.g.
Does that apply to the length of the list of the length of the string within a list? Using brackets before & after the [] is actually less ambiguous but it's hard to remember: which is the length of the string and which is the length of the list? How about:
The |
@ned21 i like the so
should always be possible. maybe we can promote
|
conclusion was that there is no real strong argument against either one, will have a look what is easiest to implement and come back with a PR |
E.g.
should be a list of strings with at least one and max 2 elements.
Should also allow
so list with 1 or 2 strings with length between 5 and 10
and also
dict(2..4)[](5..6){}(8..9)
etc etc
The text was updated successfully, but these errors were encountered: