def __init__(self, value=None): ptr = native_bt.value_array_create() self._check_create_status(ptr) super().__init__(ptr) # Python will raise a TypeError if there's anything wrong with # the iterable protocol. if value is not None: for elem in value: self.append(elem)
def __init__(self, value=None): ptr = native_bt.value_array_create() self._check_create_status(ptr) super().__init__(ptr) # Python will raise a TypeError if there's anything wrong with # the iterable protocol. if value is not None: for elem in value: self.append(elem)