Someone posted this interesting formulation, and I tried it out in a Python 3 console:
>>> (a, b) = a[b] = {}, 5
>>> a
{5: ({...}, 5)}
While there is a lot to unpack here, what I don't understand (and the semantics of interesting character formulations seems particularly hard to search for) is what the {...}
means in this context? Changing the above a bit:
>>> (a, b) = a[b] = {'x':1}, 5
>>> a
{5: ({...}, 5), 'x': 1}
It is this second output that really baffles me: I would have expected the {...}
to have been altered, but my nearest guess is that the , 5
implies a tuple where the first element is somehow undefined? And that is what the {...}
means? If so, this is a new category of type for me in Python, and I'd like to have a name for it so I can learn more.