class_docstr: Immutable Index implementing a monotonic integer range.
  
  RangeIndex is a memory-saving special case of Int64Index limited to
  representing monotonic ranges. Using RangeIndex may in some instances
  improve computing speed.
  
  This is the default index type used
  by DataFrame and Series when no explicit index is provided by the user.
  
  Parameters
  ----------
  start : int (default: 0), or other RangeIndex instance
      If int and "stop" is not given, interpreted as "stop" instead.
  stop : int (default: 0)
  step : int (default: 1)
  name : object, optional
      Name to be stored in the index
  copy : bool, default False
      Unused, accepted for homogeneity with other index types.
  
  Attributes
  ----------
  None
  
  Methods
  -------
  from_range
  
  See Also
  --------
  Index : The base pandas Index type.
  Int64Index : Index of int64 data.
class_docstr_tok: ["Immutable","Index","implementing","a","monotonic","integer","range",".","RangeIndex","is","a","memory-saving","special","case","of","Int64Index","limited","to","representing","monotonic","ranges",".","Using","RangeIndex","may","in","some","instances","improve","computing","speed",".","This","is","the","default","index","type","used","by","DataFrame","and","Series","when","no","explicit","index","is","provided","by","the","user",".","Parameters","--","--","--","--","--","start",":","int","(","default",":","0",")",",","or","other","RangeIndex","instance","If","int","and","``","stop","''","is","not","given",",","interpreted","as","``","stop","''","instead",".","stop",":","int","(","default",":","0",")","step",":","int","(","default",":","1",")","name",":","object",",","optional","Name","to","be","stored","in","the","index","copy",":","bool",",","default","False","Unused",",","accepted","for","homogeneity","with","other","index","types",".","Attributes","--","--","--","--","--","None","Methods","--","--","--","-","from_range","See","Also","--","--","--","--","Index",":","The","base","pandas","Index","type",".","Int64Index",":","Index","of","int64","data","."]
docstr: Conserve RangeIndex type for scalar and slice keys.
docstr_tok: ["Conserve","RangeIndex","type","for","scalar","and","slice","keys","."]
code: def __getitem__(self, key):
      """
      Conserve RangeIndex type for scalar and slice keys.
      """
      super_getitem = super(RangeIndex, self).__getitem__
  
      if is_scalar(key):
          if not lib.is_integer(key):
              raise IndexError(
                  "only integers, slices (`:`), "
                  "ellipsis (`...`), numpy.newaxis (`None`) "
                  "and integer or boolean "
                  "arrays are valid indices"
              )
          n = com.cast_scalar_indexer(key)
          if n != key:
              return super_getitem(key)
          if n < 0:
              n = len(self) + key
          if n < 0 or n > len(self) - 1:
              raise IndexError(
                  "index {key} is out of bounds for axis 0 "
                  "with size {size}".format(key=key, size=len(self))
              )
          return self._start + n * self._step
  
      if isinstance(key, slice):
          # This is basically PySlice_GetIndicesEx, but delegation to our
          # super routines if we don't have integers
  
          length = len(self)
  
          # complete missing slice information
          step = 1 if key.step is None else key.step
          if key.start is None:
              start = length - 1 if step < 0 else 0
          else:
              start = key.start
  
              if start < 0:
                  start += length
              if start < 0:
                  start = -1 if step < 0 else 0
              if start >= length:
                  start = length - 1 if step < 0 else length
  
          if key.stop is None:
              stop = -1 if step < 0 else length
          else:
              stop = key.stop
  
              if stop < 0:
                  stop += length
              if stop < 0:
                  stop = -1
              if stop > length:
                  stop = length
  
          # delegate non-integer slices
          if (
              start != int(start)
              or stop != int(stop)
              or step != int(step)
          ):
              return super_getitem(key)
  
          # convert indexes to values
          start = self._start + self._step * start
          stop = self._start + self._step * stop
          step = self._step * step
  
          return RangeIndex._simple_new(
              start, stop, step, name=self.name
          )
  
      # fall back to Int64Index
      return super_getitem(key)
  
imports: from datetime import timedelta
  import operator
  from sys import getsizeof
  import warnings
  import numpy
  from pandas._libs import index, lib
  import pandas.compat
  from pandas.compat import get_range_parameters, lrange, range
  from pandas.compat.numpy import function
  from pandas.util._decorators import Appender, cache_readonly
  from pandas.core.dtypes import concat
  from pandas.core.dtypes.common import is_int64_dtype, is_integer, is_scalar, is_timedelta64_dtype
  from pandas.core.dtypes.generic import ABCDataFrame, ABCSeries, ABCTimedeltaIndex
  from pandas.core import ops
  import pandas.core.common
  import pandas.core.indexes.base
  from pandas.core.indexes.base import Index, _index_shared_docs
  from pandas.core.indexes.numeric import Int64Index
label_desc: Use image node_id 36 for calling the RangeIndex obj's underlying member method code with example usage: obj.__getitem__(key) and returns: super_getitem, unknown, RangeIndex, super_getitem, super_getitem