Possible Duplicate:
Instance variables vs. class variables in Python
What is the difference between these two situations and how is it treated with in Python?
Ex1
class MyClass:
anArray = {}
Ex2
class MyClass:
__init__(self):
self.anArray = {}
It seems like the in the first example the array is being treated like a static variable. How does Python treat this and what is the reason for this?