On Jun 15, 2:17 pm, [EMAIL PROTECTED] wrote: > Does it make sense to provide this syntax for iterating key/value > pairs from a dictionary? > > for k,v in **dict(): > print k,v > > why is this not the same as: > > for k,v in dict().items(): > print k,v > > for that matter, why the heck doesn't a dictionary default to > returning a tuple > k,v pair from its iterator? > > Pax, Keith > > Ps, I'm sure someone has thought of these things before, probably been > answered before, but I'm sure I didn't find reference to them when i > searched.
The answer is simply for history and for clarity. -- http://mail.python.org/mailman/listinfo/python-list