This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: dict(key,values) initializer
Type: enhancement Stage:
Components: None Versions: Python 2.6
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: gsakkis, rhettinger
Priority: normal Keywords:

Created on 2007-02-10 02:05 by gsakkis, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg55010 - (view) Author: George Sakkis (gsakkis) Date: 2007-02-10 02:05
Far too often I use the idiom dict(zip(keys,values)), or
the same with izip. How does letting dict take two positional arguments sound ?

Pros:
- Pretty obvious semantics, no mental overhead to learn and remember it.
- More concise (especially if one imports itertools just to use izip).
- At least as efficient (and probably more) as the current alternatives.
- Backwards compatible.

George
msg55011 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2007-03-20 19:08
Sorry, the number of options for the dict constructor is already at its outer limit.  No need to further complicate the situation in order to save just five or six characters in the invocation.
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44565
2007-02-10 02:05:09gsakkiscreate