[BangPypers] list problem

Navin Kabra navin.kabra at gmail.com
Fri Jul 23 07:04:34 CEST 2010


On Thu, Jul 22, 2010 at 7:31 PM, Shashwat Anand
<anand.shashwat at gmail.com> wrote:
>> Are you sure that'll work ? Is creating a dict from a sequence guaranteed
>> to be executed serially withing the sequence ?
>
> It is nowhere mentioned in Docs IIRC but I have never seen any counter
> example.

Actually it is guaranteed.
>From the documentation of "dict":

"The elements of the argument must each also be of one of those kinds,
and each must in turn contain exactly two objects. The first is used
as a key in the new dictionary, and the second as the key’s value. If
a given key is seen more than once, the last value associated with it
is retained in the new dictionary."


More information about the BangPypers mailing list