Exception error when accessing the class variable at the termination of the program

2009-02-02 Thread jwalana
Hi All, Here is a sample piece of code with which I am having a problem, with Python version 2.4.4 class Person: Count = 0 # This represents the count of objects of this class def __init__(self, name): self.name = name print name, ' is now created'

Re: Exception error when accessing the class variable at the termination of the program

2009-02-02 Thread Duncan Booth
jwal...@vsnl.net wrote: Can someone please explain why the exception happens in the case where there is no explicit del statement? When Python is ecleaning up as it exits, it clears all the global variables in each module by setting them to None. This happens in an arbitrary and

Re: Exception error when accessing the class variable at the termination of the program

2009-02-02 Thread Chris Rebert
On Sun, Feb 1, 2009 at 11:52 PM, jwal...@vsnl.net wrote: Hi All, Here is a sample piece of code with which I am having a problem, with Python version 2.4.4 class Person: Count = 0 # This represents the count of objects of this class def __init__(self, name): self.name