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

Allow Filter when surrounded by a list #170

Open
ihoudjedje opened this issue May 23, 2018 · 0 comments
Open

Allow Filter when surrounded by a list #170

ihoudjedje opened this issue May 23, 2018 · 0 comments

Comments

@ihoudjedje
Copy link

In case having list(filter(None, my_list)) in py2.* , to be able to generate a six compatible python code, the tool transforms the latter to a one-line list comprehension list([_f for _f in my_list if _f]) !!

I understand that the filter function doesn't return a list in py3.* and that we should wrap it in a list in order to have so, but in such situations as the one described above, the filter is already surrounded by list so the code is already a py2&3 compatible and the tool can ignore it.

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