fix: provide useful behavior of default py::slice (#5620)
* Change behavior of default py::slice * make clang-tidy happy * Update tests/test_pytypes.py --------- Co-authored-by: Bryn Lloyd <12702862+dyollb@users.noreply.github.com> Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
This commit is contained in:
co-authored by
Bryn Lloyd
Henry Schreiner
parent
5c498583cc
commit
bc4a66dff0
@@ -671,6 +671,8 @@ TEST_SUBMODULE(pytypes, m) {
|
||||
|
||||
m.def("test_list_slicing", [](const py::list &a) { return a[py::slice(0, -1, 2)]; });
|
||||
|
||||
m.def("test_list_slicing_default", [](const py::list &a) { return a[py::slice()]; });
|
||||
|
||||
// See #2361
|
||||
m.def("issue2361_str_implicit_copy_none", []() {
|
||||
py::str is_this_none = py::none();
|
||||
|
||||
Reference in New Issue
Block a user