pyiterator.java
来自「tinyos最新版」· Java 代码 · 共 29 行
JAVA
29 行
// Copyright 2000 Finn Bockpackage org.python.core;/** * An abstract helper class usefull when implementing an iterator object. * This implementation supply a correct __iter__() and a next() method * based on the __iternext__() implementation. * The __iternext__() method must be supplied by the subclass. */public abstract class PyIterator extends PyObject { public PyObject __iter__() { return this; } public static PyString __doc__next = new PyString( "x.next() -> the next value, or raise StopIteration" ); public PyObject next() { PyObject ret = __iternext__(); if (ret == null) throw Py.StopIteration(""); return ret; } public abstract PyObject __iternext__();}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?