by luhn · 9y ago · 0 comments
I haven't heard this before. I subclass namedtuples regularly—whenever I need a simple immutable object. I haven't had any problems personally. (Except when pickling them. I would not recommend that.)
Can any experienced Pythonistas weigh in? Is this bad practice?
I've taken to using attrs everywhere for exactly this reason: http://attrs.readthedocs.io/en/stable/why.html#namedtuples
Its more permissive than one would expect. Although the bigger issue is what dragonne mentioned.