-
Notifications
You must be signed in to change notification settings - Fork 952
Closed
Description
I started learning PyO3 a couple of days ago, and for the longest time I was confused by the fact that PyObject represents a "free-floating" reference to a Python object, whereas the test of Py<thing>'s represent concrete Python types that are only accessible with 'py lifetime.
It might be too late now to change all that, but... it would have been much easier to grok PyO3's API structure if PyObject and PyObjectRef meanings were swapped. Furthermore, I would suggest moving PyObject's convenience methods to Py and making PyObjectRef just an alias for Py<PyObject>.
At the very least, all this should have been explained somewhere close to the top of the user guide.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels