>>> import collections >>> Point = collections.namedtuple('Point', ['x', 'y']) >>> p = Point(x=1.0, y=2.0) >>> p Point(x=1.0, y=2.0) >>> p.x 1.0 >>> p.y 2.0