The possibility exists that multiple statements could point to the same memory address, say if one were finalised and then another created that had the same address. This could have been fine in the code, but it's more clearly robust to use a new object() for each pointer, since multiple that are equal to each other cannot exist at the same time in Python.
Since objects are hashable, then also a dictionary can be used, which results in constant time access to statements rather than O(N). Probably really unlikely to have any sort of high number of statements live at the same time, but you never know...
The possibility exists that multiple statements could point to the same memory address, say if one were finalised and then another created that had the same address. This could have been fine in the code, but it's more clearly robust to use a new object() for each pointer, since multiple that are equal to each other cannot exist at the same time in Python.
Since objects are hashable, then also a dictionary can be used, which results in constant time access to statements rather than O(N). Probably really unlikely to have any sort of high number of statements live at the same time, but you never know...