We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76a7343 commit 4e4ad51Copy full SHA for 4e4ad51
src/array_api_extra/_lib/_utils/_helpers.py
@@ -396,6 +396,10 @@ class Pickler(pickle.Pickler): # numpydoc ignore=GL01,RT01
396
397
@override
398
def persistent_id(self, obj: object) -> object: # pyright: ignore[reportIncompatibleMethodOverride] # numpydoc ignore=GL08
399
+
400
+ # Fast exit in case of basic builtin types.
401
+ # Note that basic collections (tuple, list, etc.) are in this;
402
+ # persistent_id() will be called again with their contents.
403
if type(obj) in _BASIC_TYPES: # No subclasses!
404
return None
405
0 commit comments