On 2017-10-20 10:58, ast wrote: > > "ast" <[email protected]> a écrit dans le message de > news:[email protected]... > > Neither works for large integers which is > even more disturbing > > a = 6555443 > b = copy.copy(a) > a is b > > True
Why is this disturbing? As you said, it'd be completely pointless. As to what's going on: copy.copy does not make any attempt to copy immutable types. That's all there is to it. Read the source if you want to know how this is done. https://github.com/python/cpython/blob/master/Lib/copy.py#L111 -- Thomas Jollans -- https://mail.python.org/mailman/listinfo/python-list
