Is it possible to have a namedtuple inside another namedtuple?
For example:
from collections import namedtuple
Position = namedtuple('Position', 'x y')
Token = namedtuple('Token', ['key', 'value', Position])
which gives a "ValueError: Type names and field names must be valid identifiers"
Also, I am curious if there is a more Pythonic approach to build such a nested container?