'A string representation of the token that can reproduce it
with eval(), which lists all the token\'s non-default
annotations.'

def __repr__(self):

    typestr = ((u'    type=%s,' % unicode_repr(self.type)) if (self.type != self.tok) else u'')
    propvals = u',    '.join(((u'%s=%s' % (p, unicode_repr(getattr(self, p)))) for p in self._properties if getattr(self, p)))
    return (u'%s(%s,%s    %s)' % (self.__class__.__name__, unicode_repr(self.tok), typestr, propvals))
