MCPcopy Create free account
hub / github.com/pybind/pybind11 / next

Method next

tests/test_sequences_and_iterators.cpp:508–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506 PySequenceIterator(const Sequence &seq, py::object ref) : seq(seq), ref(ref) { }
507
508 float next() {
509 if (index == seq.size())
510 throw py::stop_iteration();
511 return seq[index++];
512 }
513
514 const Sequence &seq;
515 py::object ref; // keep a reference

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected