Issue 1656538: dict(key,values) initializer - Python tracker (original) (raw)
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