detecting modifications to an instance? (for debugging)

Fortepianissimo fortepianissimo at yahoo.com.tw
Wed Apr 9 01:16:00 EDT 2003


I have a big chunk of Python code and I'd like to detect any run-time
modification to instances of a particular class.

I'd like to know how to do it with a minimal addition of code, i.e.,
it's much preferrable to make the code report any such instances
instead of using a third-party debugging tool for it.

Note I just want to detect the modification, not to prevent them
(which I think is impossible in Python).

Any suggestion is extremely welcome!




More information about the Python-list mailing list