def __lt__(self, other):
if not isinstance(other, Mapping):<EOL><INDENT>return NotImplemented<EOL><DEDENT>if PY2:<EOL><INDENT>cp = super(MIMapping, self).__cmp__(other) <EOL>if cp < <NUM_LIT:0>:<EOL><INDENT>return True<EOL><DEDENT>if cp == <NUM_LIT:0>:<EOL><INDENT>if isinstance(other, MIMapping):<EOL><INDENT>return force_list(self.indices.keys()) < force_list(other.indices.keys())<EOL><DEDENT><DEDENT>return False<EOL><DEDENT>else: <EOL><INDENT>raise TypeError('<STR_LIT>' % (self, other))<EOL><DEDENT>
Check if ``self < other``

If ``other`` is not a Mapping type, return NotImplemented.

If ``other`` is a Mapping type, compare in the following order:
    * convert ``self`` to an OrderedDict or a dict (depends on the type of ``other``)
      and compare it with ``other``
    * index names (only if ``other`` is a MIMapping)