Skip to content

MAINT: Use the error_converting macro where possible #9544

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
Aug 12, 2017

Conversation

eric-wieser
Copy link
Member

If we have the macro, we may as well use it.

Note that we can't use this macro on unsigned types.

@charris
Copy link
Member

charris commented Aug 12, 2017

Hmm, I'd almost prefer removing the current uses of error_converting as the code is more self documenting without it and it isn't a complicated check. That said, this looks good to me otherwise, so I'll probably grump and put it in.

@eric-wieser
Copy link
Member Author

eric-wieser commented Aug 12, 2017

I'd almost prefer removing the current uses of error_converting a

That is indeed the other option that's better than doing nothing, but I'm not sure I agree it's more self-documenting without it

@charris
Copy link
Member

charris commented Aug 12, 2017

The problem with too many macros is that you've got to find where they are defined and look at them before you know what is going on, and they are seldom documented. Of course, most of our functions are undocumented also ...

@charris charris merged commit 8ed1770 into numpy:master Aug 12, 2017
@charris
Copy link
Member

charris commented Aug 12, 2017

Thanks Eric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants