Open hhoeflin opened 3 years ago
In
https://github.com/plotly/dash/blob/e727dd7e37d20147f6eefbdd35bd12319a026b27/dash/dependencies.py#L27
the hash is implemented as
def __hash__(self): hash(str(self))
where
def __str__(self): return "{}.{}".format(self.component_id_str(), self.component_property) def __repr__(self): return "<{} `{}`>".format(self.__class__.__name__, self)
so that an Input and State with the same id would yield the same hash-value.
Input
State
I plan to insert Input and State objects into a dict, and this could cause issues.
Good catch @hhoeflin - let's change that to hash(repr(self))
hash(repr(self))
In
https://github.com/plotly/dash/blob/e727dd7e37d20147f6eefbdd35bd12319a026b27/dash/dependencies.py#L27
the hash is implemented as
where
so that an
Input
andState
with the same id would yield the same hash-value.I plan to insert
Input
andState
objects into a dict, and this could cause issues.