Class behaving like a static class
gu
pistacchio at gmail.com
Tue Jan 27 06:33:43 EST 2009
Hi to all,
i have a module (a single .py file, actually), with a class called
HashedDir.
when i import the file and instanciate 2 instances of that class, when i
check the object's fields they're always the same, even if the two
objects should be different.
Eg:
h1 = HashedDir('someValue')
print h1.value # someValue
h2 = HashedDir('someOtherValue')
print h1.value # someOtherValue
print h2.value # someOtherValue
Any idea?
Thanks in advance
More information about the Python-list
mailing list