Skip to content

COMPAT: Don't use re module's private type #20551

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
TomAugspurger opened this issue Mar 30, 2018 · 2 comments
Closed

COMPAT: Don't use re module's private type #20551

TomAugspurger opened this issue Mar 30, 2018 · 2 comments
Labels
Compat pandas objects compatability with Numpy or Python functions good first issue Refactor Internal refactoring of code
Milestone

Comments

@TomAugspurger
Copy link
Contributor

return isinstance(obj, re._pattern_type)

In 3.6+ there's typing.re.Pattern. Otherwise, there's _re_type = type(re.compile('')).

@TomAugspurger TomAugspurger added Refactor Internal refactoring of code Compat pandas objects compatability with Numpy or Python functions Effort Low good first issue labels Mar 30, 2018
@TomAugspurger TomAugspurger added this to the 0.23.0 milestone Mar 30, 2018
@jreback
Copy link
Contributor

jreback commented Mar 30, 2018

is there a pep reference for this?

@TomAugspurger
Copy link
Contributor Author

I assume not, since it's a private attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions good first issue Refactor Internal refactoring of code
Projects
None yet
Development

No branches or pull requests

2 participants