On 8 jun 2010, at 08:08, Payal <payal-pyt...@scriptkitchen.com> 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? > In short, not in any compatible way. If you have a bounded list of names, you can check them with the is operator. But the question "are there any names anywhere in my program that refer to this object?" is generally not answerable. The more relevant question is: why would you want to know this? Hugo _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor