Python Class Factory to Produce simple Struct-like classes.
While investigating Ruby I came across this to create a simple Struct-like class: Person = Struct.new(:forname, :surname) person1 = Person.new('John', 'Doe') puts person1 #<struct Person forname="John", surname="Doe"> Which raised a few Python questions for me. I have written a [VERY] basic clone of this mechanism in Python: def Str...