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

STY: Use hasattr to determine if an object has an attribute #2718

Closed
wants to merge 2 commits into from

Conversation

j-t-1
Copy link
Contributor

@j-t-1 j-t-1 commented Jun 17, 2024

No description provided.

@j-t-1
Copy link
Contributor Author

j-t-1 commented Jun 17, 2024

@stefan6419846 error of my understanding somewhere, I thought the logical and would short circuit.

@stefan6419846
Copy link
Collaborator

You are silently dropping the obj.indirect_reference is None condition with your change, thus most likely leading to the discovered failures.

@stefan6419846
Copy link
Collaborator

I am probably going to close this issue in the next days unless there are explicit reasons to keep it. Using hasattr requires a third condition and there is no real need to refactor this here.

@j-t-1 j-t-1 deleted the hasattr branch June 24, 2024 08:10
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