-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Enforce user to specify a value #574
Comments
Congratulations! You've made a duplicate of the very first issue ever opened on the Param github repo: #1 . :-) Another user also requested this recently, on some other forum (Stackoverflow, maybe?). It's related to #97 , in that I think we should define a non-None value that is Undefined or NotImplemented, to distinguish between a valid value of None and an invalid value that should force inheritance from a superclass and eventually error if not ever set. I'd be happy for someone to investigate what it would take to close issues 1 and 97, which I don't think is difficult but requires some work to see what sentinel value is appropriate and whether we can preserve backwards compatibility properly if we change various None defaults to this sentinel. I'll close this issue as a duplicate, but it's still a valid request! BTW, detecting the case you showed above is tricky, because |
As mentioned above, this is a duplicate of #1 |
I am designing a
Parameterized
class that requires some of the parameters to be set on instantiation.I would expect the below to raise an error. But it does not
Workaround
If I create a custom
__init__
I can get it working.The text was updated successfully, but these errors were encountered: