Planet London Python

January 22, 2012

Fuzzyman

Callable object with state using generators

It's often convenient to create callable objects that maintain some kind of state. In Python we can do this with objects that implement the __call__ method and store the state as instance attributes. ... [596 words]

January 22, 2012 03:05 PM