Skip to content
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

define 2-arg Base.hash #154

Merged
merged 1 commit into from
Apr 20, 2022
Merged

define 2-arg Base.hash #154

merged 1 commit into from
Apr 20, 2022

Conversation

stevengj
Copy link
Member

If you only define the 1-argument hash(o::Py), then the 2-argument form hash(o, h::UInt) falls back to the generic Base method using objectid(o), which is not what you want.

(Subtracting - 3h is what Base.hash typically does to mix hashes; I'm not sure if you want to do something fancier here?)

@codecov
Copy link

codecov bot commented Apr 20, 2022

Codecov Report

Merging #154 (2b7705f) into main (b4528b7) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##             main     #154   +/-   ##
=======================================
  Coverage   29.01%   29.01%           
=======================================
  Files          70       70           
  Lines        4012     4012           
=======================================
  Hits         1164     1164           
  Misses       2848     2848           
Impacted Files Coverage Δ
src/Py.jl 27.30% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4528b7...2b7705f. Read the comment docs.

@cjdoris cjdoris merged commit e768d0b into JuliaPy:main Apr 20, 2022
@cjdoris
Copy link
Collaborator

cjdoris commented Apr 20, 2022

Looks great, thanks.

@stevengj stevengj deleted the patch-1 branch April 21, 2022 01:00
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.

2 participants