On 2017-10-20 10:58, ast wrote: > > "ast" <nomail@com.invalid> a écrit dans le message de > news:59e9b419$0$3602$426a7...@news.free.fr... > > 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