[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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 a solution to #1484 and #1588 #1591

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Give a solution to #1484 and #1588 #1591

wants to merge 1 commit into from

Conversation

paoyw
Copy link
@paoyw paoyw commented Jun 13, 2024

I try to give a simplest solution for the unexpected result of reversed in #1484 and #1588.
The functionality of the built-in function reversed should return a reversed iterator of the input.
However, the tqdm does not behave as the common behavior when warped with reversed.
The further detail of the are well-mentioned in the previous issues, #1484 and #1588.
I try to come up with a solution that requires the minimum modification of the original code, and small impact to the performance.
The solution is to use the standard library of Python, copy, to shallow copy the original object of the tqdm and replace the self.iterable by the reversed of it.
Hope this non-intuitive behavior can be changed.
Thanks.

P.S. Due to the unsigned commit in the previous PR, I open a new one.

@paoyw paoyw requested a review from casperdcl as a code owner June 13, 2024 02:59
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.

1 participant