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

Opinionated warning: require strict= argument to zip() builtin #311

Closed
Zac-HD opened this issue Nov 22, 2022 · 2 comments · Fixed by #314
Closed

Opinionated warning: require strict= argument to zip() builtin #311

Zac-HD opened this issue Nov 22, 2022 · 2 comments · Fixed by #314

Comments

@Zac-HD
Copy link
Member

Zac-HD commented Nov 22, 2022

In Python 3.10, PEP-618 added optional length-checking to zip().

Requiring uses of zip() to declare either strict= would be a nice option to prevent bugs when the argument was omitted, and the iterables were unexpectedly of different lengths. Of course it could also be pretty noisy, not to mention requiring Python 3.10 or later, so I think this should be disabled by default.

@cooperlees
Copy link
Collaborator

Sounds helpful and worth adding. I for one didn't know this was added. Could we not just enable it only for >= 3.10 by default and not for < 3.10?

@Zac-HD
Copy link
Member Author

Zac-HD commented Nov 23, 2022

I don't think we can (consistently) tell what the intended my minimum Python version should be, so enabled by default doesn't seem practical until 3.9 reaches end of life.

Zac-HD added a commit that referenced this issue Dec 6, 2022
anthrotype added a commit to googlefonts/fontmake that referenced this issue Dec 8, 2022
hotenov added a commit to hotenov/LEP-downloader that referenced this issue Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants