def _get_sequence_len(self): """ Return the len of a sequence or a negative value on error. """ seq = nbt._bt_python_get_sequence_from_def(self._d) return nbt._bt_sequence_len(seq)
def _get_sequence_len(self): """ Return the len of a sequence or a negative value on error. """ seq = nbt._bt_python_get_sequence_from_def(self._d) return nbt._bt_sequence_len(seq)
def _get_sequence_element_at(self, index): """ Return the sequence's element at position index, otherwise return None """ seq = nbt._bt_python_get_sequence_from_def(self._d) if seq is not None: definition_ptr = nbt._bt_sequence_index(seq, index) if definition_ptr is not None: return _Definition(definition_ptr, self.scope)
def _get_sequence_element_at(self, index): """ Return the sequence's element at position index, otherwise return None """ seq = nbt._bt_python_get_sequence_from_def(self._d) if seq is not None: definition_ptr = nbt._bt_sequence_index(seq, index) if definition_ptr is not None: return _Definition(definition_ptr, self.scope)