

def __repr__(self):
    name = ('unknown, ' if (self.subject is None) else (self.subject + ', '))
    name += (repr(self.name) if (self.name is not None) else 'unnamed')
    n_vert = len(self)
    return ('<Label  |  %s, %s : %i vertices>' % (name, self.hemi, n_vert))

dataset/ETHPy150Open mne-tools/mne-python/mne/label.py Label.__repr__/original