def __init__(self, space, w_cls, bytes): """ Initialize immutable bytes object and store its bytes in `self.immutable_bytes` slot. `W_BytesObject.__init__(self, space, w_class, size)` not called, because there is no need to `self.mutate()` and set `self.bytes`. """ W_AbstractObjectWithClassReference.__init__(self, space, w_cls) self.immutable_bytes = bytes
def __init__(self, space, w_cls, words): """ Initialize immutable words object and store its words in `self.immutable_words` slot. `W_Immutable_WordsObject.__init__(self, space, w_class, size)` not called, because there is no need to initialize `self.words`. """ W_AbstractObjectWithClassReference.__init__(self, space, w_cls) self.immutable_words = words
def __init__(self, space, w_class, size): W_AbstractObjectWithClassReference.__init__(self, space, w_class) self.words = [r_uint(0)] * size
def __init__(self, space, w_class, size): W_AbstractObjectWithClassReference.__init__(self, space, w_class) assert isinstance(size, int) self.mutate() self.bytes = ['\x00'] * size