Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give Memento objects a nicer repr #105

Open
Mr0grog opened this issue Nov 2, 2022 · 0 comments
Open

Give Memento objects a nicer repr #105

Mr0grog opened this issue Nov 2, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@Mr0grog
Copy link
Member

Mr0grog commented Nov 2, 2022

Calling repr() with a Memento object gets you a not-very-useful representation:

<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.

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.

@Mr0grog Mr0grog added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed and removed help wanted Extra attention is needed labels Nov 2, 2022
@Mr0grog Mr0grog added this to the v0.4.x milestone Nov 10, 2022
@Mr0grog Mr0grog moved this to Backlog in Wayback Roadmap Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Backlog
Development

No branches or pull requests

1 participant