Skip to content

Add ordered_get() to HistoryBuffer #364

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

Closed
wants to merge 3 commits into from

Conversation

schultetwin1
Copy link
Contributor

This allows users to get access to the elements of the history buffer in historical order.

schultetwin1 and others added 3 commits April 6, 2025 17:56
This allows users to get access to the elements of the history buffer
in historical order.
@reitermarkus
Copy link
Member

reitermarkus commented Apr 6, 2025

Okay, after refactoring this to self.oldest_ordered().nth(idx), I am not convinced we should have a separate method for this. Most often you will need recent() or oldest(), for the other times I think oldest_ordered().nth(n) is actually more readable and easy enough to use.

@schultetwin1 schultetwin1 deleted the ordered_get branch April 7, 2025 03:56
@schultetwin1
Copy link
Contributor Author

I did not realize I could just use self.oldest_ordered().nth(idx), I agree that's fine. Thank you for all the time you spent looking at this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants