filmov
tv
Python: How to copy lists of list or lists of objects

Показать описание
I ran into a nasty little gotcha when writing a QR Code generator in Python. It turns out that when you copy a list the right way, it doesn't necessarily copy the objects inside as new objects. Whenever you copy a list of objects (a list of lists is actually a list of list objects) you need to use deepcopy. This video shows you the why and how of that process. You may also read the description along with the code by following this link:
Комментарии