A question on modification of a list via a function invocation

Marko Rauhamaa marko at pacujo.net
Fri Sep 8 10:20:52 EDT 2017


ram at zedat.fu-berlin.de (Stefan Ram):

> Marko Rauhamaa <marko at pacujo.net> writes:
>>I definitely trust that:
>>a = b
>>assert a is b
>>even when b holds an immutable object.
>
> |Python 3.6.0 ...
> |>>> x = 21568
> |>>> x is 21568
> |False

I wasn't talking about x or 21568. I was talking about a and b.


Marko



More information about the Python-list mailing list