'pattern is None or repeated string'

def __init__(self, parent, name, nbytes, description='Padding', pattern=None):

    assert ((pattern is None) or isinstance(pattern, str))
    Bytes.__init__(self, parent, name, nbytes, description)
    self.pattern = pattern
    self._display_pattern = self.checkPattern()
