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

Use safe_hasattr in dir2 #4382

Merged
merged 1 commit into from
Oct 14, 2013
Merged

Conversation

jtratner
Copy link
Contributor

Add test cases

Move safe_hasattr to utils/dir2

Fixes #4381 (and helps out pandas-dev/pandas#5182)

@jtratner
Copy link
Contributor Author

Happy to slim down if you want.

except:
return False

hasattr = safe_hasattr
Copy link
Member

Choose a reason for hiding this comment

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

We should call safe_hasattr, not alias hasattr to it, for clarity.

Add test cases

Move safe_hasattr to utils/dir2
@jtratner
Copy link
Contributor Author

Need release notes? Different commit message?

@jtratner
Copy link
Contributor Author

@takluyver just tell me if you want me to make any changes and I'll be happy to do so.

@takluyver
Copy link
Member

Sorry, I just hadn't looked at it over the weekend. No, no need for release notes for a bugfix like this - we autogenerate a list of closed issues and PRs for each release.

I'll merge this now. Thanks.

takluyver added a commit that referenced this pull request Oct 14, 2013
@takluyver takluyver merged commit 2cdbe39 into ipython:master Oct 14, 2013
@jtratner
Copy link
Contributor Author

totally fine with me - I was in no rush. Glad I could be helpful!

@jtratner jtratner deleted the safer-hasattr-in-dir2 branch October 14, 2013 21:51
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
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.

Using hasattr for trait_names instead of just looking for it directly/using __dir__?
2 participants