Skip to content
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

allow_none on Number-like traits. #3672

Closed
Carreau opened this issue Jul 17, 2013 · 4 comments
Closed

allow_none on Number-like traits. #3672

Carreau opened this issue Jul 17, 2013 · 4 comments
Milestone

Comments

@Carreau
Copy link
Member

Carreau commented Jul 17, 2013

Would it be reasonable to have an allow_none kwarg on nuber-like traits ?

I raise the question for @jakevdp that have start/end traits for slicing a list, and having None would help a lot the logic of slicing.

@minrk
Copy link
Member

minrk commented Jul 17, 2013

Hm. I wouldn't think so - I would add a different trait for that.

@Carreau
Copy link
Member Author

Carreau commented Jul 17, 2013

Hm. I wouldn't think so - I would add a different trait for that.

IntergerMaybeNone ? (sound haskell)

@minrk
Copy link
Member

minrk commented Jul 17, 2013

What's it for? Inside IPython, or use elsewhere? I don't think we have a need for it in IPython.

If it's specifically for use in slices, I might just call it SliceField. Part of the point of traitlets is they are extensible - it's totally reasonable to define your own traitlets in your own project that have their own validation behavior

@Carreau
Copy link
Member Author

Carreau commented Jul 18, 2013

Thanks, we went with custom traitlets. Closing.

@Carreau Carreau closed this as completed Jul 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants