copy.copy

ast ast at invalid
Mon Nov 22 09:39:23 EST 2021


Hi,

 >>> a = 6
 >>> b = 6
 >>> a is b
True

ok, we all know that Python creates a sole instance
with small integers, but:

 >>> import copy
 >>> b = copy.copy(a)
 >>> a is b
True

I was expecting False


More information about the Python-list mailing list