On Mon, Apr 28, 2014 at 12:11 PM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: > Suppose we could pass variables directly to the constructor, like this: > > a = b = 2 > L = [1, 2, 3] > dctA = dict(a, b, L[1], 2, 1+1) > > Obviously all five values are 2, but what are the keys? > > The dict construct > receives five arguments, all bound to the object 2. (That might be the > same object five times, or five distinct objects, all with the same value > of 2.)
Just to nit-pick: A conforming Python implementation might pass up to four distinct objects, but the first two MUST be the same object. :) ChrisA -- https://mail.python.org/mailman/listinfo/python-list