public bool __eq__([NotNull] PythonRange other) { if (_length != other._length) { return(false); } if (_length == 0) { return(true); } if (start != other.start) { return(false); } if (_length == 1) { return(true); } if (Last() != other.Last()) { return(false); } return(step == other.step); }
internal PythonRangeIterator(PythonRange range) { _range = range; _value = range.start - range.step; // this could cause overflow, fine }
public bool __ne__([NotNull] PythonRange other) => !__eq__(other);
public bool __ge__(PythonRange other) { throw new TypeErrorException("unorderable types: range() >= range()"); }
public bool __ne__(PythonRange other) { return(!__eq__(other)); }