parameters: (self)
return_statement: return self._length
docstring: Length of the iterable.
  
          If the iterable is a generator or otherwise does not have a
          size, it is eagerly evaluated to get a size.
docstring_summary: Length of the iterable.
docstring_tokens: Length of the iterable .
function: def length(self) -> int:
          """Length of the iterable.
  
          If the iterable is a generator or otherwise does not have a
          size, it is eagerly evaluated to get a size.
          """
          if self._length is not None:
              return self._length
  
          try:
              self._length = len(self._iterable)  # type: ignore
          except TypeError:
              iterable = list(self._iterator)
              self._iterator = self._to_iterator(iterable)
              self._length = len(iterable) + self.index + (self._after is not missing)
  
          return self._length
function_tokens: def length ( self ) -> int : if self . _length is not None : return self . _length try : self . _length = len ( self . _iterable ) # type: ignore except TypeError : iterable = list ( self . _iterator ) self . _iterator = self . _to_iterator ( iterable ) self . _length = len ( iterable ) + self . index + ( self . _after is not missing ) return self . _length