We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c4e3b13 commit d1910f3Copy full SHA for d1910f3
2 files changed
src/slice.cpp
@@ -34,4 +34,14 @@ slice_base::step() const
34
((PySliceObject*)this->ptr())->step));
35
}
36
37
+static struct register_slice_pytype_ptr
38
+{
39
+ register_slice_pytype_ptr()
40
+ {
41
+ const_cast<converter::registration &>(
42
+ converter::registry::lookup(boost::python::type_id<boost::python::slice>())
43
+ ).m_class_object = &PySlice_Type;
44
+ }
45
+}register_slice_pytype_ptr_;
46
+
47
} } } // !namespace boost::python::detail
test/slice.py
@@ -33,6 +33,8 @@
33
0
>>> check_slice_get_indices( slice( -2, -5, -2))
6
+>>> check_slice_get_indices.__doc__.strip().split('\\n')[0]
+'check_slice_get_indices( (slice)arg1) -> int :'
"""
# Performs an affirmative and negative argument resolution check.
0 commit comments