Skip to content

Conversation

leonelcamara
Copy link
Contributor

@leonelcamara leonelcamara commented Oct 2, 2025

strkeys is a map object (a lazy iterator in Python 3, unlike Python 2 where it returned a list). This means If you try to check membership with in, it exhausts the iterator progressively, this leads to very funny errors and sometimes the validator would seem to work correctly depending on the order.

Ohh yeah this Fixes #732 I didn't know this was reported, his suggestion would also work

strkeys is a map object (a lazy iterator in Python 3, unlike Python 2 where it returned a list).
This means If you try to check membership with **in**, it exhausts the iterator progressively, this leads to very funny errors and sometimes the validator would seem to work correctly depending on the order.
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.

Validators incorrectly fail multiple choice
1 participant