File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -34,4 +34,14 @@ slice_base::step() const
3434 ((PySliceObject*)this ->ptr ())->step ));
3535}
3636
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+
3747} } } // !namespace boost::python::detail
Original file line number Diff line number Diff line change 33330
3434>>> check_slice_get_indices( slice( -2, -5, -2))
35356
36+ >>> check_slice_get_indices.__doc__.strip().split('\\ n')[0]
37+ 'check_slice_get_indices( (slice)arg1) -> int :'
3638"""
3739
3840# Performs an affirmative and negative argument resolution check.
You can’t perform that action at this time.
0 commit comments