nustack
ReferenceNuformscollections

abc

Generic collection interfaces and interactions.

Module nu.forms.collections.abc.

Generic collection interfaces and interactions.

set_interactions

Module nu.forms.collections.abc.set_interactions.

Set interactions.

Full entries

NameSortCallMeaning
AddCmdscalar_commandAddCmd()Add element to set: s.add(value). Mutates the set; returns nothing.
Differencescalar_queryDifference()Set difference: left.difference(right). Returns a new set.
DifferenceUpdatescalar_commandDifferenceUpdate()Remove elements found in other: s.difference_update(other). Mutates the set; returns nothing.
Discardscalar_commandDiscard()Discard element from set: s.discard(value). Mutates the set; returns nothing.
Intersectionscalar_queryIntersection()Set intersection: left.intersection(right). Returns a new set.
IntersectionUpdatescalar_commandIntersectionUpdate()Keep only elements found in both: s.intersection_update(other).
IsDisjointscalar_queryIsDisjoint()Test if disjoint: left.isdisjoint(right). Returns a bool.
IsSubsetscalar_queryIsSubset()Test if subset: left <= right. Returns a bool.
IsSupersetscalar_queryIsSuperset()Test if superset: left >= right. Returns a bool.
Removescalar_commandRemove()Remove element from set: s.remove(value). Mutates the set; returns nothing.
SetAndscalar_querySetAnd()Set intersection operator: left & right. Returns a new set.
SetIAndscalar_actionSetIAnd()In-place intersection: left &= right. Mutates the set; returns the set.
SetIOrscalar_actionSetIOr()In-place union: left |= right. Mutates the set; returns the set.
SetISubscalar_actionSetISub()In-place difference: left -= right. Mutates the set; returns the set.
SetIXorscalar_actionSetIXor()In-place symmetric difference: left ^= right. Mutates the set; returns the set.
SetOrscalar_querySetOr()Set union operator: left | right. Returns a new set.
SetPopscalar_actionSetPop()Pop arbitrary element: s.pop(). Mutates the set; returns the element.
SetSubscalar_querySetSub()Set difference operator: left - right. Returns a new set.
SetUpdatescalar_commandSetUpdate()Update set with elements from other: s.update(other). Mutates the set; returns nothing.
SetXorscalar_querySetXor()Set symmetric difference operator: left ^ right. Returns a new set.
SymmetricDifferencescalar_querySymmetricDifference()Set symmetric difference: left.symmetric_difference(right). Returns a new set.
SymmetricDifferenceUpdatescalar_commandSymmetricDifferenceUpdate()Keep elements in either but not both: s.symmetric_difference_update(other).
Unionscalar_queryUnion()Set union: left.union(right). Returns a new set.

sequence_interactions

Module nu.forms.collections.abc.sequence_interactions.

Sequence interactions.

Full entries

NameSortCallMeaning
Appendscalar_commandAppend()Append item to end: seq.append(value). Mutates slot 0; returns nothing.
Countscalar_queryCount()Count occurrences: seq.count(value).
DelIndexscalar_commandDelIndex()Subscript delete: del seq[index]. Mutates slot 0; returns nothing.
Extendscalar_commandExtend()Extend sequence with iterable: seq.extend(other). Mutates slot 0; returns nothing.
Firstscalar_queryFirst()First element: seq[0]. Returns Invalid if empty.
IAddscalar_actionIAdd()In-place concat: seq += other. Mutates slot 0 and returns it (Python iadd).
IMulscalar_actionIMul()In-place repeat: seq *= n. Mutates slot 0 and returns it (Python imul).
IndexOfscalar_queryIndexOf()Find index of value: seq.index(value). Returns Invalid if not found.
Insertscalar_commandInsert()Insert item at index: seq.insert(index, value). Mutates slot 0; returns nothing.
Lastscalar_queryLast()Last element: seq[-1]. Returns Invalid if empty.
Popscalar_actionPop()Pop item at index: seq.pop(index). Mutates slot 0 and returns the popped value.
RemoveValuescalar_commandRemoveValue()Remove first occurrence of value: seq.remove(value). Mutates slot 0; returns nothing.
Reversescalar_commandReverse()Reverse sequence in-place: seq.reverse(). Mutates slot 0; returns nothing.
SetIndexscalar_commandSetIndex()Subscript write: seq[index] = value. Mutates slot 0; returns nothing.
Sortscalar_commandSort()Sort sequence in-place: list.sort(). Mutates slot 0; returns nothing.

shared_interactions

Module nu.forms.collections.abc.shared_interactions.

Shared collection mutation commands.

Full entries

NameSortCallMeaning
Clearscalar_commandClear()Clear all items: collection.clear(); mutates the collection, returns nothing.

mapping_interactions

Module nu.forms.collections.abc.mapping_interactions.

Mapping interactions.

Full entries

NameSortCallMeaning
ContainsKeyscalar_queryContainsKey()Test key membership: key in mapping. Yields a bool.
DeleteItemscalar_commandDeleteItem()Delete entry by key: del mapping[key]. Mutates slot 0; returns nothing.
DictPopscalar_actionDictPop()Pop value by key with optional default: mapping.pop(key, default).
Getscalar_queryGet()Get value from mapping with optional default: mapping.get_item(key, default) or mapping[key].
Itemsscalar_queryItems()Get items view from mapping: mapping.items().
Keysscalar_queryKeys()Get keys view from mapping: mapping.keys().
Mergescalar_queryMerge()Merge two mappings into a new one: mapping | other. Yields a new dict.
MergeUpdatescalar_actionMergeUpdate()In-place merge: mapping |= other. Mutates slot 0 and yields the mapping.
PopItemscalar_actionPopItem()Pop arbitrary item: mapping.popitem().
ReversedItemsscalar_queryReversedItems()(key, value) pairs in reverse insertion order: reversed(mapping.items()).
ReversedKeysscalar_queryReversedKeys()Reverse-order keys: reversed(mapping). Yields keys in reverse insertion order.
ReversedValuesscalar_queryReversedValues()Values in reverse insertion order: reversed(mapping.values()).
SetDefaultscalar_actionSetDefault()Set default value if key missing: mapping.setdefault(key, default).
Updatescalar_commandUpdate()Update mapping with another: mapping.update(other). Mutates slot 0; returns nothing.
Valuesscalar_queryValues()Get values view from mapping: mapping.values().

nu.core.access

Module nu.core.access.

Access atoms: Python's item and attribute management.

Full entries

NameSortCallMeaning
SetItemscalar_commandSetItem(target, key, value)Subscript write: x[k] = v.

collection

Module nu.forms.collections.abc.collection.

Collection capability.

Full entries

NameCallMeaning
CollectionFormCollectionForm()Base for collection values, like collections.abc.Collection.

container

Module nu.forms.collections.abc.container.

Container capability.

Full entries

NameCallMeaning
ContainerFormContainerForm()Base for values that support containment checks, like collections.abc.Container.

iterable

Module nu.forms.collections.abc.iterable.

Iterable capability.

Full entries

NameCallMeaning
IterableFormIterableForm()Base for values that support iteration, like collections.abc.Iterable.

mapping

Module nu.forms.collections.abc.mapping.

Mapping collection: bases + mutations.

Full entries

NameCallMeaning
MappingFormMappingForm()Base for mapping values: key lookup plus key/value/item views.
MutableMappingFormMutableMappingForm()Base for mutable mapping values: adds in-place writes over MappingForm.
ReactiveMappingFormReactiveMappingForm()Reactive mapping: adds any-change observation over MutableMappingForm.

sequence

Module nu.forms.collections.abc.sequence.

Sequence collection: bases + mutations.

Full entries

NameCallMeaning
MutableSequenceFormMutableSequenceForm()Base for in-place-mutable sequences, like collections.abc.MutableSequence.
ReactiveSequenceFormReactiveSequenceForm()Sequence with change subscriptions layered on MutableSequenceForm.
SequenceFormSequenceForm()Base for ordered, indexable values, like collections.abc.Sequence.

set_

Module nu.forms.collections.abc.set_.

Set collection: bases + mutations.

Full entries

NameCallMeaning
MutableSetFormMutableSetForm()Base for mutable set values, like collections.abc.MutableSet.
ReactiveSetFormReactiveSetForm()Reactive set. Adds on_change() for any-change observation.
SetLikeFormSetLikeForm()Base for set values, like collections.abc.Set.

sized

Module nu.forms.collections.abc.sized.

Sized capability.

Full entries

NameCallMeaning
SizedFormSizedForm()Base for values that have a length, like collections.abc.Sized.

sliceable

Module nu.forms.collections.abc.sliceable.

Sliceable capability.

Full entries

NameCallMeaning
SliceableFormSliceableForm()Base for values that support slicing.

On this page