Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement FromPyObject for PySlice #4858

Open
kylebarron opened this issue Jan 14, 2025 · 1 comment
Open

Implement FromPyObject for PySlice #4858

kylebarron opened this issue Jan 14, 2025 · 1 comment

Comments

@kylebarron
Copy link
Contributor

PySlice currently does not implement FromPyObject. This seems like a simple oversight? It would be nice to use .extract() to create a PySlice.

@davidhewitt
Copy link
Member

davidhewitt commented Jan 15, 2025

PySlice is a Python-native type so should be handled in smart pointers like Bound<'py, PySlice> and Py<PySlice>. It should already be possible to .extract() to these types, just like for Bound<'py, PyAny>, Bound<'py, PyDict> etc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants