def head(self, key, back=0):
        """Get the head commit for a key.

        >>> repo.commit('foo', 'bar', message="leveraging fu")
        >>> commit = repo.head('foo')
        >>> commit.message
        u'leveraging fu'
        >>> commit.author.name
        u'Jon Q. User'
        >>> commit.time
        1332438935L

        :param key: The key to look up.
        :type key: string
        :param back:
            (optional) How many steps back from head to get the commit.
            Defaults to 0 (the current head).
        :type back: integer

        :returns: the data
        :rtype: int, float, NoneType, unicode, boolean, list, or dict
        :raises:
            KeyError if there is no entry for key, IndexError if too many steps
            back are specified.
        """
        try:
            return itertools.islice(self.log(key), back, back + 1).next()
        except KeyError:
            raise KeyError(key % "There is no key at %s")
        except StopIteration:
            raise IndexError("%s has fewer than %s commits" % (key, back))
dataset/ETHPy150Open talos/jsongit/jsongit/models.py/Repository.head/swapped operands of `%`