4 ms·
Python Descriptors Demystified
- kespindler 13y agom = Movie('Casablanca', 97, 102, 964000, 1300000) del m Isn't ``m`` going to persist in the ``Movie.rating.data`` dictionary? It seems like this approach would cause a lot of problems for garbage collection.
- piqufoh 13y agoWith "del m" you're asking python to delete the whole "m", including "Movie.rating.data" (as "rating.data" is an attribute of "m" that you've just asked to be deleted). But your question isn't 100% clear to me...