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 Generators for vol.In #523

Merged
merged 1 commit into from
Jul 22, 2024
Merged

Conversation

cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Jul 19, 2024

While the use of Container for vol.In is correct, it's incompatible with Generator even though the ... in ... check works fine.

For objects that don’t define contains(), the membership test first tries iteration via iter()

Ref #518
https://docs.python.org/3/library/collections.abc.html#collections-abstract-base-classes
https://docs.python.org/3/reference/datamodel.html#object.__contains__

/CC @farmio

Copy link

@farmio farmio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks.

Copy link
Owner

@alecthomas alecthomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks.

@alecthomas alecthomas merged commit a7a55f8 into alecthomas:master Jul 22, 2024
8 checks passed
@cdce8p cdce8p deleted the allow-generators branch July 22, 2024 16:05
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

Successfully merging this pull request may close these issues.

3 participants