Skip to content

Simplify implementation of is_numlike & is_string_like. #7996

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

Merged
merged 1 commit into from
Jan 31, 2017

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 30, 2017

See #7795 and #7835 for the motivation. Note that this PR does not actually deprecate either function -- just replaces them by a "saner" implementation (as argued in the issues).

except:
return False
return True
return isinstance(obj, (six.string_types, np.str_))
Copy link
Member

@story645 story645 Jan 31, 2017

Choose a reason for hiding this comment

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

please add np.unicode_

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah the joys of Py2... fixed.

@anntzer anntzer force-pushed the is_numlike_stringlike branch from bdfa250 to 6b716cf Compare January 31, 2017 05:36
@story645 story645 changed the title Simplify implementation of is_numlike & is_string_like. [MRG+1] Simplify implementation of is_numlike & is_string_like. Jan 31, 2017
@NelleV
Copy link
Member

NelleV commented Jan 31, 2017

I half expected this patch to break all our tests…
LGTM 👍

@NelleV NelleV merged commit 6d3610b into matplotlib:master Jan 31, 2017
@anntzer anntzer deleted the is_numlike_stringlike branch January 31, 2017 18:10
@QuLogic QuLogic changed the title [MRG+1] Simplify implementation of is_numlike & is_string_like. Simplify implementation of is_numlike & is_string_like. Jan 31, 2017
@QuLogic QuLogic added this to the 2.1 (next point release) milestone Jan 31, 2017
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.

4 participants