A borrow of a reference to a Python object. This avoids having clone the PyRef<T>
/
PyObjectRef
, which isn’t that cheap as that increments the atomic reference counter.
The PyObjectRef
is one of the most used types. It is a reference to a
python object. A single python object can have multiple references, and
this reference counting is accounted for by this type. Use the .clone()
method to create a new reference and increment the amount of references
to the python object by 1.
A reference to a Python object.
PyRef but guaranteed not to be a subtype instance