Steven D'Aprano <[EMAIL PROTECTED]> writes: > I have a class which is not intended to be instantiated. Instead of > using the class to creating an instance and then operate on it, I > use the class directly, with classmethods. Essentially, the class is > used as a function that keeps state from one call to the next.
Classes aren't designed to keep state; state is kept in instances. I think you want Alex Martelli's 'Borg' pattern <URL:http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/66531>, which is a class where each instance shares the same state. -- \ “Pinky, are you pondering what I'm pondering?” “I think so, | `\ Brain, but there's still a bug stuck in here from last time.” | _o__) —_Pinky and The Brain_ | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list