Skip to content

Use safe_hasattr in dir2#4382

Merged
takluyver merged 1 commit into
ipython:masterfrom
jtratner:safer-hasattr-in-dir2
Oct 14, 2013
Merged

Use safe_hasattr in dir2#4382
takluyver merged 1 commit into
ipython:masterfrom
jtratner:safer-hasattr-in-dir2

Conversation

@jtratner
Copy link
Copy Markdown
Contributor

Add test cases

Move safe_hasattr to utils/dir2

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

@jtratner
Copy link
Copy Markdown
Contributor Author

Happy to slim down if you want.

Comment thread IPython/utils/dir2.py Outdated
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Need release notes? Different commit message?

@jtratner
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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