3 ms·
Copy on write can be very dangerous if not used properly. Besides concurrency issues (not specifically for python, because of the GIL), in the case of slice tak
by ot 16y ago
Copy on write can be very dangerous if not used properly. Besides concurrency issues (not specifically for python, because of the GIL), in the case of slice taking a small slice from a big list would keep a reference to the list even if it is not needed anymore. In pathological cases this can be as bad as a memory leak.