3 ms·
I sometimes make calls to collections.namedtuple and other class building functions at the same time as the rest of my definitions.
by zipfle 13y ago
I sometimes make calls to collections.namedtuple and other class building functions at the same time as the rest of my definitions.
- rcfox 13y agoIf you pass verbose=True to namedtuple(), you can see that it's essentially just defining a new class. This is something that people already do at the top level of a module.