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

support Sequence #304

Closed
samuelcolvin opened this issue Nov 16, 2018 · 3 comments
Closed

support Sequence #304

samuelcolvin opened this issue Nov 16, 2018 · 3 comments
Labels
feature request help wanted Pull Request welcome

Comments

@samuelcolvin
Copy link
Member

Feature Request

Sequence should be supported, I guess list and tuple should work, anything else?

@samuelcolvin
Copy link
Member Author

Useful when you want a Tuple but don't yet know it's length.

@pilosus
Copy link
Contributor

pilosus commented Mar 20, 2019

Useful when you want a Tuple but don't yet know it's length.

Isn't a Sequence type always has __len__ and __getitem__ methods, so length should be known.
Could you give an example?

I guess list and tuple should work, anything else?

range maybe?

@samuelcolvin
Copy link
Member Author

I guess the Tuple case we can support with Tuple[int, ...] etc.

Point of Sequence would just be to allow either List or Tuple.

@pilosus pilosus mentioned this issue Mar 21, 2019
4 tasks
alexdrydew pushed a commit to alexdrydew/pydantic that referenced this issue Dec 23, 2023
* change how arguments are defined

* tests for missing and extra dict keys with __args__/__kwargs__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request help wanted Pull Request welcome
Projects
None yet
Development

No branches or pull requests

2 participants