Skip to content

CLN: share compatibility-check code #30688

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 4, 2020

Conversation

jbrockmendel
Copy link
Member

No description provided.

@jreback jreback added Clean Period Period data type labels Jan 4, 2020
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

what is the advantage of having raise_on_incompatible return an exception, just to always raise it?

@jbrockmendel
Copy link
Member Author

what is the advantage of having raise_on_incompatible return an exception, just to always raise it?

Among other things, mypy has an easier time telling that we have raised. This is also the pattern we've moved to in Index

@WillAyd
Copy link
Member

WillAyd commented Jan 4, 2020

AFAIK you could just type the function as NoReturn (though maybe not available until 3.6.4)

No preference on my end between raise and return so lgtm

@jreback jreback added this to the 1.0 milestone Jan 4, 2020
@jreback jreback merged commit d5d9d79 into pandas-dev:master Jan 4, 2020
@jreback
Copy link
Contributor

jreback commented Jan 4, 2020

ok thanks

@jbrockmendel jbrockmendel deleted the ref-raiseon branch January 4, 2020 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Period Period data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants