New-C-API-for-Python
New-C-API-for-Python copied to clipboard
Suggestion: use `PyAny` instead of `PyRef`
Just read the brief notes at https://github.com/markshannon/New-C-API-for-Python/blob/main/implementation.md and thought I would give you food for thought with PyAny as the name of the handle instead of PyRef.
We've used this name in PyO3 and it seems to resonate well with users - it's concise and compatible with the concept introduced in typing.Any.
This might be especially nice if you want to introduce typed handles like PyDict etc., with casts to/from the PyAny type (presumably with or without checking).