class someclass:
someattr = "foo"
def somemethod(self):
#self.y = self.y
self.__class__.someattr = "bar"
print self.someattr
someclass().somemethod()
interesting how that commented-out line makes a difference - I just learned a quirk of the python scoping rules.