-
-
Notifications
You must be signed in to change notification settings - Fork 328
Closed
Labels
priority-1-highShould be resolved ASAP.Should be resolved ASAP.type-refactorAbout improving code structure.About improving code structure.
Milestone
Description
Current Situation
Currently in hooks, we use is
to check whether or not two things are the same for all given values. This is not how strict equality in works in Javascript. Doing this also makes it difficult to limit effect triggers and memoized function calls.
Further, identity comparison for int
will produce weird results since we can assert 1 is 1
but not assert 1000 is 1000
.
Proposed Actions
Use ==
to compare the following types in hooks:
- int
- float
- complex
- str
- bytes
- bytearray
- memoryview
We'll need to implement a strictly_equal
function since we'll need this comparison behavior in a lot of places through hooks.py
Metadata
Metadata
Assignees
Labels
priority-1-highShould be resolved ASAP.Should be resolved ASAP.type-refactorAbout improving code structure.About improving code structure.