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

python 3 iterator updates #147

Closed
bj0 opened this issue Sep 19, 2017 · 0 comments
Closed

python 3 iterator updates #147

bj0 opened this issue Sep 19, 2017 · 0 comments

Comments

@bj0
Copy link

bj0 commented Sep 19, 2017

In Python 3 the filter and map functions produce iterators instead of lists, which can only be iterated once. This breaks some features like --current which loop over filter objects multiple times (for searching for pids).

This can be fixed by replacing them with either list(filter(...)) or list comprehensions.

ozziefallick pushed a commit to ozziefallick/pidcat that referenced this issue Jan 31, 2022
Wrapped filter() calls with list() to restore previous functionality. This is backwards-compatible with Python 2.
ozziefallick added a commit to ozziefallick/pidcat that referenced this issue Mar 8, 2022
Version increases to 2.1.1 to cover fixes for Issues JakeWharton#147 and JakeWharton#178.
1fexd pushed a commit to 1fexd/pidcat that referenced this issue Apr 7, 2024
Wrapped filter() calls with list() to restore previous functionality. This is backwards-compatible with Python 2.
1fexd pushed a commit to 1fexd/pidcat that referenced this issue Apr 7, 2024
1fexd pushed a commit to 1fexd/pidcat that referenced this issue Apr 7, 2024
Version increases to 2.1.1 to cover fixes for Issues JakeWharton#147 and JakeWharton#178.
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

No branches or pull requests

1 participant