-
Notifications
You must be signed in to change notification settings - Fork 24
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
RangeWidget argument check #4
Comments
Is "turns" supposed to be the name of the widget? If so, you would want to specify the keyword. RangeWidget(1, 10, name="turns")
|
It's worth pointing out that the RangeWidget was created with python's built-in >>> range(1, 11)
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>> range(0, 30, 5)
[0, 5, 10, 15, 20, 25]
>>> range(0, 10, 3) |
I agree with both your comments. I only suggest that you check the type of the supplied input because if the type is wrong then the error can be swallowed up somewhere inside the mechanism and they whole thing just doesn't work without explicitly failing. For example, if I run |
First of all - this is awesome.
I ran
RangeWidget(1,10,"turns")
and it took me some time to understand that it's not working because the third argument isstep
.I suggest to check the type of the arguments in
widgets.py
line 42.If you agree than I can do it myself and create a PR
Cheers
Yoav
The text was updated successfully, but these errors were encountered: