While investigating Ruby I came across this to create a simple Struct-like class:
Person = Struct.new(:forname, :surname) person1 = Person.new(\'John\', \'Do
There is namedtuple
>>> from collections import namedtuple >>> Person = namedtuple("Person", ("forename", "surname")) >>> john = Person("John", "Doe") >>> john.forename 'John' >>> john.surname 'Doe'