Package topo :: Package misc :: Module utils :: Class Struct
[hide private]
[frames] | no frames]

Class Struct

source code

A simple structure class, taking keyword args and assigning them to attributes.

For instance:

s = Struct(foo='a',bar=1) >>> s.foo 'a' >>> s.bar 1

From http://www.norvig.com/python-iaq.html



Instance Methods [hide private]
 
__init__(self, **entries) source code
 
__repr__(self) source code