Open Mr0grog opened 2 years ago
Calling repr() with a Memento object gets you a not-very-useful representation:
repr()
Memento
<wayback._models.Memento object at 0x102447970>
Instead, this should include some more info (at least the URL and timestamp?) and not include _models since users shouldn’t be importing that.
_models
For example:
<wayback.Memento url="https://www3.epa.gov/" timestamp="20221001000000"> <wayback.Memento url="https://www3.epa.gov/" timestamp="2022-10-01T00:00:00Z"> <wayback.Memento "https://www3.epa.gov/" at 2022-10-01T00:00:00Z>
Or something along those lines.
This should just involve adding a __repr__(self) method to Memento.
__repr__(self)
Calling
repr()
with aMemento
object gets you a not-very-useful representation:Instead, this should include some more info (at least the URL and timestamp?) and not include
_models
since users shouldn’t be importing that.For example:
Or something along those lines.
This should just involve adding a
__repr__(self)
method toMemento
.