Is there a module that allows me to find errors that occur due to copy by reference? I am looking for something like the following:
>>> import mydebug >>> mydebug.checkcopybyreference = True >>> a=2 >>> b=[a] >>> a=4 Traceback (most recent call last): File "<stdin>", line 1, in ? CopyByReferenceError: Variable b refers to variable a, so please do not change variable a. Does such a module exist? Would it be possible to code such a module? Would it be possible to add the functionality to array-copying in numpy? What would be the extra cost in terms of memory and CPU power? I realize that this module would disable some useful features of the language. On the other hand it could be helpful for new python users. Niels -- http://mail.python.org/mailman/listinfo/python-list