I would like to store a dimension namedtuple
(x, y)
. I will only need this once in my entire program.
I could do:
Dimension = namedtuple('Dimension', ['x', 'y'])
dim = Dimension(2, 3)
but, since I'm sure this is the only Dimension
I will need in the entire program, I was wondering if I could make this into one-liner that returns an object whose properties I can access like dim.x
and dim.y
?