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

Normative Conventions: pretend primitives aren't iterable #152

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

michaelficarra
Copy link
Member

We discussed this in the June plenary while considering iterator helper follow-on proposals. While we didn't call for consensus on it, there were many voices in support of this and none opposed. I will propose we officially adopt it at an upcoming plenary.

normative-conventions.md Outdated Show resolved Hide resolved
Copy link
Contributor

@bakkot bakkot left a comment

Choose a reason for hiding this comment

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

🎉

Gotta do that followup to add .codepoints() and/or similar methods for getting iterators though.

@michaelficarra michaelficarra changed the title Normative Conventions: pretend Strings aren't iterable Normative Conventions: pretend primitives aren't iterable Jun 19, 2024
@michaelficarra
Copy link
Member Author

I think we could probably get away with also changing Iterator.from to reject primitives.

@bakkot
Copy link
Contributor

bakkot commented Jul 3, 2024

Iterator.from is a coercion method, so its input type should be looser. We specifically discussed that exact question, including in plenary.

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.

None yet

3 participants