tuple_removetuple_removeTupleRemoveTupleRemovetuple_remove (Operator)
Name
tuple_removetuple_removeTupleRemoveTupleRemovetuple_remove — Eliminieren einzelner Elemente aus einem Tupel.
Signatur
def tuple_remove(tuple: MaybeSequence[Union[float, int, str]], index: MaybeSequence[int]) -> Sequence[Union[float, int, str]]
def tuple_remove_s(tuple: MaybeSequence[Union[float, int, str]], index: MaybeSequence[int]) -> Union[float, int, str]
Beschreibung
tuple_removetuple_removeTupleRemoveTupleRemovetuple_remove eliminiert einzelne Elemente aus einem Tupel
TupleTupleTupletupletuple und liefert die verbleibenden Elemente über den Parameter
ReducedReducedReducedreducedreduced zurück. Der Parameter IndexIndexIndexindexindex enthält hierbei
die Indizes der Elemente, die eliminiert werden sollen.
Folgerichtig darf IndexIndexIndexindexindex ausschließlich ganze Zahlen
beinhalten (falls IndexIndexIndexindexindex eine Gleitkommazahl enthält, so
muss diese eine ganze Zahl repräsentieren; alle Nachkommastellen der
Zahl müssen also 0 sein). Tupelindizes werden beginnend mit 0 gezählt,
das heißt das erste Tupelelement wird über den Index 0 ausgewählt.
Doppelte Indizes oder Indizes, die außerhalb des gültigen Bereichs
liegen, werden ignoriert.
Sonderfall: Leeres Eingabetupel
Falls TupleTupleTupletupletuple leer ist, gibt der Operator ein leeres Tupel
zurück.
HDevelop Inline-Operation
HDevelop unterstützt eine Inline-Operation für tuple_removetuple_removeTupleRemoveTupleRemovetuple_remove,
die innerhalb eines Ausdrucks in der folgenden Syntax verwendet werden
kann:
Reduced := remove(Tuple, Index)
Ausführungsinformationen
- Multithreading-Typ: independent (läuft parallel auch zu exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Wird ohne Parallelisierung verarbeitet.
Parameter
TupleTupleTupletupletuple (input_control) tuple(-array) → HTupleMaybeSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Eingabetupel.
IndexIndexIndexindexindex (input_control) integer(-array) → HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Indizes der zu löschenden Elemente.
ReducedReducedReducedreducedreduced (output_control) tuple(-array) → HTupleSequence[Union[float, int, str]]HTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Verbleibende Tupelelemente.
Alternativen
tuple_first_ntuple_first_nTupleFirstNTupleFirstNtuple_first_n,
tuple_last_ntuple_last_nTupleLastNTupleLastNtuple_last_n,
tuple_str_bit_selecttuple_str_bit_selectTupleStrBitSelectTupleStrBitSelecttuple_str_bit_select,
tuple_concattuple_concatTupleConcatTupleConcattuple_concat,
tuple_inserttuple_insertTupleInsertTupleInserttuple_insert,
tuple_replacetuple_replaceTupleReplaceTupleReplacetuple_replace
Siehe auch
tuple_selecttuple_selectTupleSelectTupleSelecttuple_select,
tuple_select_masktuple_select_maskTupleSelectMaskTupleSelectMasktuple_select_mask
Modul
Foundation