class_docstr: Support structure for PVector that implements structural sharing for vectors using a trie.
class_docstr_tok: ["Support","structure","for","PVector","that","implements","structural","sharing","for","vectors","using","a","trie","."]
code: def __getitem__(self, index):
      if isinstance(index, slice):
          # There are more conditions than the below where it would be OK to
          # return ourselves, implement those...
          if (
              index.start is None
              and index.stop is None
              and index.step is None
          ):
              return self
  
          # This is a bit nasty realizing the whole structure as a list before
          # slicing it but it is the fastest way I've found to date, and it's easy :-)
          return _EMPTY_PVECTOR.extend(self.tolist()[index])
  
      if index < 0:
          index += self._count
  
      return PythonPVector._node_for(self, index)[index & BIT_MASK]
  
imports: from abc import abstractmethod, ABCMeta
  from ._compat import Sequence, Hashable
  from numbers import Integral
  import operator
  import six
  from pyrsistent._transformations import transform
label_desc: Use image node_id 3 for calling the PythonPVector obj's underlying member method code with example usage: obj.__getitem__(index) and returns: PythonPVector, _EMPTY_PVECTOR, self