Payal wrote:
Hi,
If I have a list (or a dict), is there any way of knowing how many other
variables are referencing the same object?
With warm regards,
-Payal
Depends on what you mean by variables.
Try sys.getrefcount(mylist)
Naturally, the count will be one higher than you expect. And you should
only use this for debugging purposes.
DaveA
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor