              return self._get_single_external(index)
  
      def __delitem__(self, index):
          "Delete the item(s) at the specified index/slice."
          if not isinstance(index, six.integer_types + (slice,)):
              raise TypeError("%s is not a legal index" % index)
  
          # calculate new length and dimensions
          origLen = len(self)
          if isinstance(index, six.integer_types):
 
</s> remove         if isinstance(index, six.integer_types):
 </s> add         if isinstance(index, int): </s> remove         if not isinstance(index, six.integer_types):
 </s> add         if not isinstance(index, int): </s> remove         if isinstance(index, six.integer_types):
 </s> add         if isinstance(index, int): </s> remove         if isinstance(index, six.string_types):
 </s> add         if isinstance(index, str): </s> remove         if not isinstance(index, (slice,) + six.integer_types):
 </s> add         if not isinstance(index, (int, slice)):
        if not isinstance(index, (int, slice)):
              return self._get_single_external(index)
  
      def __delitem__(self, index):
          "Delete the item(s) at the specified index/slice."
        if not isinstance(index, (int, slice)):
              raise TypeError("%s is not a legal index" % index)
  
          # calculate new length and dimensions
          origLen = len(self)
          if isinstance(index, six.integer_types):
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
django/contrib/gis/geos/mutable_list.py