0

I've seen in code examples people use deepcopy, to copy a dictionary, and i've read that dictionaries in some instances might get scrued up, when data is being added to them, and deep copy acts like a new memory zone, which will basically keep populating the dictionary without rewriting the existing memory if that makes sens?

Like c++ pointers to some degree?

Can someone help me understand this functionality that happens to dictionaries or maybe other data structs in python ?

Rolfsky
  • 63
  • 7
  • Does this answer your question? [Are python variables pointers? or else what are they?](https://stackoverflow.com/questions/13530998/are-python-variables-pointers-or-else-what-are-they) – MisterMiyagi Apr 14 '21 at 15:02
  • Python abstracts the memory management away from you. So, try not to think in pointers as in C. Also the use of memory is the matter or the interpreter not the language. Every interpreter (and version) can have its own implementation. – Klaus D. Apr 14 '21 at 15:06
  • While this looks like a generally useful question, the way it is asked makes it both very broad *and* very specific. Answering it might entail anything from shortly outlining that objects have identity, to giving a full description of how specific data structures may be represented at runtime on a specific reference architecture/language. Please try to make it clear what you are looking for. – MisterMiyagi Apr 14 '21 at 15:09

0 Answers0