Help with changes in traceback stack from Python 2.7 to Python 3.x
Steven D'Aprano
steve at pearwood.info
Mon Apr 28 03:20:14 EDT 2014
On Mon, 28 Apr 2014 12:19:02 +1000, Chris Angelico wrote:
> On Mon, Apr 28, 2014 at 12:11 PM, Steven D'Aprano
> <steve+comp.lang.python at 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. :)
So it does, thanks for the correction.
--
Steven
More information about the Python-list
mailing list