-
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Consider adding NonEmptyList
#257
Comments
@sobolevn i would like to contribute. But should this type be a part of |
You can create a new package :) |
@sobolevn well, actually if the point of returns is to "Make your functions return something meaningful, typed, and safe!", then i guess it makes sense to have |
I found this issue via web search. The feature request is valid, but rather than every developer will maintains own type hints, I think it makes sense to collaborate with maintainers of an existing solution, e.g. https://github.com/annotated-types/annotated-types or Pydantic. |
@sobolevn maybe |
Currently, Python does not have any valid type elements to work with lists.
And while
List
itself is good enough for collections and other things, sometimes we need to explicitly mark some list to have at least one argument.Related: https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/
The text was updated successfully, but these errors were encountered: