You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than returning `PyObject` here it would probably be nicer if we returned `&PyEllipsis`, and created a new struct `types::PyEllipsis`. (Would avoid the need to increase a reference count here.)
That would also mean that x.is_instance::<PyEllipsis>() would just work instead of needing is_ellipsis, which does have the upside of avoiding a special method. Not necessarily saying that it's better, perhaps is_ellipsis is still warranted.
Also, adding types::PyEllipsis would pave the way for instead just having PyEllipsis::get(py) to retrieve the singleton, rather than adding this to Python which I don't think really needs this method.
That would also mean that
x.is_instance::<PyEllipsis>()
would just work instead of needingis_ellipsis
, which does have the upside of avoiding a special method. Not necessarily saying that it's better, perhapsis_ellipsis
is still warranted.Also, adding
types::PyEllipsis
would pave the way for instead just havingPyEllipsis::get(py)
to retrieve the singleton, rather than adding this toPython
which I don't think really needs this method.Originally posted by @davidhewitt in #2911 (comment)
The text was updated successfully, but these errors were encountered: