Skip to content

Commit 330cef9

Browse files
committed
f
1 parent dfad14d commit 330cef9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/array_api_extra/_lib/_utils/_helpers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,10 @@ class Pickler(pickle.Pickler): # numpydoc ignore=GL01,RT01
396396

397397
@override
398398
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.
399403
if type(obj) in _BASIC_TYPES: # No subclasses!
400404
return None
401405

0 commit comments

Comments
 (0)