Skip to content

Why hash of pymatgen.analysis.reaction_calculator.BalancedReaction is hardcoded as int 7? #3673

Answered by janosh
DanielYang59 asked this question in Q&A
Discussion options

You must be logged in to vote

beats me. i assume there's no good reason for this particular value. we could probably change it to

 def __hash__(self) -> int: 
    return hash((self.reactants_coeffs, self.products_coeffs))

or remove it altogether

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@DanielYang59
Comment options

@janosh
Comment options

Answer selected by DanielYang59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Questions about functionality and design choices analysis Concerning pymatgen.analysis hash Hashing related issues
2 participants