+ Make Python API more pythonic
This commit is contained in:
@@ -503,9 +503,9 @@ PyObject* TopoShapeEdgePy::split(PyObject *args)
|
||||
}
|
||||
par.push_back(val);
|
||||
}
|
||||
else if (PyList_Check(float_or_list)) {
|
||||
Py::List list(float_or_list);
|
||||
for (Py::List::iterator it = list.begin(); it != list.end(); ++it) {
|
||||
else if (PySequence_Check(float_or_list)) {
|
||||
Py::Sequence list(float_or_list);
|
||||
for (Py::Sequence::iterator it = list.begin(); it != list.end(); ++it) {
|
||||
double val = (double)Py::Float(*it);
|
||||
if (val == f || val == l) {
|
||||
PyErr_SetString(PyExc_ValueError, "Cannot split edge at start or end point");
|
||||
|
||||
Reference in New Issue
Block a user