MCPcopy Create free account
hub / github.com/boostorg/histogram / next

Method next

src/python/axis.cpp:41–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39struct generic_iterator {
40 generic_iterator(bp::object o) : iterable(o), size(bp::len(iterable)) {}
41 bp::object next() {
42 if (idx == size) {
43 PyErr_SetString(PyExc_StopIteration, "No more items.");
44 bp::throw_error_already_set();
45 }
46 return iterable[idx++];
47 }
48 generic_iterator& self() { return *this; }
49 bp::object iterable;
50 unsigned idx = 0;

Callers 2

testMethod · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by 2

testMethod · 0.36
mainFunction · 0.36