'Convert to formal string, for repr().'

def __repr__(self):

    L = [self._year, self._month, self._day, self._hour, self._minute, self._second, self._microsecond]
    if (L[(-1)] == 0):
        del L[(-1)]
    if (L[(-1)] == 0):
        del L[(-1)]
    s = ',    '.join(map(str, L))
    s = ('%s(%s)' % (('datetime.' + self.__class__.__name__), s))
    if (self._tzinfo is not None):
        assert (s[(-1):] == ')')
        s = ((s[:(-1)] + (',    tzinfo=%r' % self._tzinfo)) + ')')
    return s
