|
|
|
|
|
by sago
3596 days ago
|
|
First para: I think maybe you're confusing 'class' with inheritance from 'object'. A good tip is to do: class Foo(namedtuple('Foo', (...)):
def __repr__(self):
...
Your 'Foo' gets ordering, hashing, comparison, because it derives from 'namedtuple'. It gets '__repr__' too, but in the example I'm overriding that. |
|