pyslice.java

来自「tinyos最新版」· Java 代码 · 共 36 行

JAVA
36
字号
// Copyright (c) Corporation for National Research Initiativespackage org.python.core;/** * A python slice object. */public class PySlice extends PyObject {    public PyObject start, stop, step;    public static PyClass __class__;    public PySlice(PyObject start, PyObject stop, PyObject step) {        super(__class__);        if (start == null) start = Py.None;        if (stop == null) stop = Py.None;        if (step == null) step = Py.One;        this.start = start;        this.stop = stop;        this.step = step;    }    public PyString __str__() {        return new PyString(start.__repr__()+":"+stop.__repr__()+":"+                            step.__repr__());    }    public PyString __repr__() {        return new PyString("slice("+start.__repr__()+", "+                            stop.__repr__()+", "+                            step.__repr__()+")");    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?