Skip to content

Make fromkeys() take an Iterable instead of a sequence [REVERTED] - #605

Merged
gvanrossum merged 1 commit into
masterfrom
fromkeys
Oct 14, 2016
Merged

gvanrossum merged 1 commit into
masterfrom
fromkeys

Conversation

@gvanrossum

@gvanrossum gvanrossum commented Oct 14, 2016 •

Copy link
Copy Markdown
Member

(This, too, came up in python/mypy#2254 -- thanks @rwbarton!)

UPDATE: This was rolled back.

@gvanrossum
gvanrossum merged commit 66e8d4a into master Oct 14, 2016
@gvanrossum
gvanrossum deleted the fromkeys branch October 14, 2016 17:00
@gvanrossum

Copy link
Copy Markdown
Member Author

Hm... Either this one or the previous one (#604) caused breakage on dict.fromkeys('abcde'). But why?!?!

@gvanrossum

Copy link
Copy Markdown
Member Author

Oh. It's python/mypy#328

gvanrossum pushed a commit that referenced this pull request Oct 15, 2016
Reason: python/mypy#328

* Revert "Make fromkeys() take an Iterable instead of a sequence. (#605)"

  This reverts commit 66e8d4a.

* Revert "Make dict.fromkeys() a classmethod (which it is). (#604)"

  This reverts commit 26dfcb6.

* Add an explanation for fromkeys() being a staticmethod.
@gvanrossum gvanrossum changed the title Make fromkeys() take an Iterable instead of a sequence. Make fromkeys() take an Iterable instead of a sequence [REVERTED] Mar 15, 2017
hswong3i pushed a commit to alvistack/python-typeshed that referenced this pull request May 25, 2025
hswong3i pushed a commit to alvistack/python-typeshed that referenced this pull request Jun 4, 2025
We don't generally try to "backport PEP 604" on Python <3.10; this is more consistent with our features
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.

1 participant