-
Notifications
You must be signed in to change notification settings - Fork 801
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
PyEllipsis
type
#2906
Comments
We can make a method for that just like If you want it in safe rust right now, I think you'd need to get the |
Thanks that would be great, that's what I was using, but your comment lead me to what I really needed which was simply fn is_ellipsis(v: &PyAny) -> bool {
unsafe { v.as_ptr() == Py_Ellipsis() }
} Might be worth adding |
2911: add `Ellipsis()` and `is_ellipsis()` methods r=mejrs,davidhewitt a=samuelcolvin fix #2906 Please consider adding the following to your pull request: - [x] an entry for this PR in newsfragments - see [https://pyo3.rs/main/contributing.html#documenting-changes] - [x] docs to all new functions and / or detail in the guide - [x] tests for all new or changed functions Co-authored-by: Samuel Colvin <s@muelcolvin.com>
Would be great to have an Ellipsis type, aka
...
in python.The ffi type seems to exist
pyo3/pyo3-ffi/src/sliceobject.rs
Lines 11 to 13 in 18081ba
But I'm not sure how I would use it in safe rust code.
The text was updated successfully, but these errors were encountered: