[−][src]Struct rustpython_vm::obj::objrange::PyRange
range(stop) -> range object range(start, stop[, step]) -> range object
Return an object that produces a sequence of integers from start (inclusive) to stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1. start defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3. These are exactly the valid indices for a list of 4 elements. When step is given, it specifies the increment (or decrement).
Fields
start: PyIntRef
stop: PyIntRef
step: PyIntRef
Methods
impl PyRange
[src][−]
pub fn index_of(&self, value: &BigInt) -> Option<BigInt>
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn forward(&self) -> bool
[src]
pub fn get(&self, index: &BigInt) -> Option<BigInt>
[src]
Trait Implementations
impl Clone for PyRange
[src][+]
impl Debug for PyRange
[src][+]
impl PyClassDef for PyRange
[src]
impl PyClassImpl for PyRange
[src][+]
impl PyValue for PyRange
[src][+]
Auto Trait Implementations
impl !RefUnwindSafe for PyRange
impl !Send for PyRange
impl !Sync for PyRange
impl Unpin for PyRange
impl !UnwindSafe for PyRange
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> IntoPyObject for T where
T: PyValue,
[src][+]
T: PyValue,
impl<T> PyObjectPayload for T where
T: 'static + PyValue,
[src][+]
T: 'static + PyValue,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[+]
V: MultiLane<T>,