loop beats generator expr creating large dict!?
David Isaac
aisaac0 at verizon.net
Tue Oct 3 08:57:09 EDT 2006
Does George's example raise the question:
why do dictionaries not implement efficient creation
for two common cases?
- Making a dict from two sequences of the same length.
- Making a dict from a sequence and a function
(as in George's example in this thread).
The current situation is:
use a loop because the obvious generator approach
is not efficient. Something seems wrong here...
Cheers,
Alan Isaac
More information about the Python-list
mailing list