Skip to content

BUG: Don't modify types after PyType_Ready - #8888

Merged
juliantaylor merged 1 commit into
numpy:masterfrom
eric-wieser:fix-float64.__hash__
Apr 3, 2017
Merged

juliantaylor merged 1 commit into
numpy:masterfrom
eric-wieser:fix-float64.__hash__

Conversation

@eric-wieser

Copy link
Copy Markdown
Member

This would previously cause hashing to work even though __hash__ is None.

Fixes #8887

@eric-wieser

Copy link
Copy Markdown
Member Author

Seems that 9bcc664 already knew about this problem, but forgot to fix it in both places

This would previously cause hashing to work even though `__hash__` is None.

Fixes numpy#8887
@eric-wieser
eric-wieser force-pushed the fix-float64.__hash__ branch from 3efbe1f to 17909cc Compare April 3, 2017 18:00
@rlamy

rlamy commented Apr 3, 2017

Copy link
Copy Markdown
Contributor

+1, I independently came up with the same fix for #8887.

@juliantaylor

Copy link
Copy Markdown
Contributor

are there more cases of this? this would be the third fix of this kind, still a nice find.

@juliantaylor

Copy link
Copy Markdown
Contributor

from a quick glance only doc/newdtype_example/floatint.c still might be wrong, but its just an example.

@eric-wieser

Copy link
Copy Markdown
Member Author

floatint.c looks fine to me.

@juliantaylor

Copy link
Copy Markdown
Contributor

oh yeah, FloatInt != Float ...

@juliantaylor

Copy link
Copy Markdown
Contributor

thanks

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.

3 participants