Skip to content

BUG: is_list_like returns True even if __iter__ raises an error #54363

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

Conversation

ArchPh03nix
Copy link
Contributor

@ArchPh03nix ArchPh03nix commented Aug 1, 2023

Changed so c_is_list_like() returns false if iter() throws exception

Changed so c_is_list_like() returns false if __iter__() throws exception
Updated to show fix to issue pandas-dev#54176
@ArchPh03nix ArchPh03nix requested a review from WillAyd as a code owner August 1, 2023 21:21
ArchPh03nix and others added 2 commits August 2, 2023 16:00
Changed so StringMethod objects are counted as list_like
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the issue I don't think we actually want to change this function. I think the solution instead will be to move away from is_list_like

@ArchPh03nix
Copy link
Contributor Author

@mroeschke Is removing the implementation of is_list_like as it is and going in the direction of a handful of explicitly supported types the correct direction to go?

@mroeschke
Copy link
Member

is_list_like is public so it can't be outright removed, but slowly internal usages should move away from is_list_like.

IOW, I would recommend working on another issue in the meantime until this issue is more settled

@mroeschke
Copy link
Member

Thanks for the PR but going to close until there's more direction on the original issue

@mroeschke mroeschke closed this Aug 8, 2023
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.

BUG: is_list_like returns True even if __iter__ raises an error
2 participants