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.
| Name | Sort | Call | Meaning |
|---|---|---|---|
| AddCmd | scalar_command | AddCmd() | Add element to set: s.add(value). Mutates the set; returns nothing. |
| Difference | scalar_query | Difference() | Set difference: left.difference(right). Returns a new set. |
| DifferenceUpdate | scalar_command | DifferenceUpdate() | Remove elements found in other: s.difference_update(other). Mutates the set; returns nothing. |
| Discard | scalar_command | Discard() | Discard element from set: s.discard(value). Mutates the set; returns nothing. |
| Intersection | scalar_query | Intersection() | Set intersection: left.intersection(right). Returns a new set. |
| IntersectionUpdate | scalar_command | IntersectionUpdate() | Keep only elements found in both: s.intersection_update(other). |
| IsDisjoint | scalar_query | IsDisjoint() | Test if disjoint: left.isdisjoint(right). Returns a bool. |
| IsSubset | scalar_query | IsSubset() | Test if subset: left <= right. Returns a bool. |
| IsSuperset | scalar_query | IsSuperset() | Test if superset: left >= right. Returns a bool. |
| Remove | scalar_command | Remove() | Remove element from set: s.remove(value). Mutates the set; returns nothing. |
| SetAnd | scalar_query | SetAnd() | Set intersection operator: left & right. Returns a new set. |
| SetIAnd | scalar_action | SetIAnd() | In-place intersection: left &= right. Mutates the set; returns the set. |
| SetIOr | scalar_action | SetIOr() | In-place union: left |= right. Mutates the set; returns the set. |
| SetISub | scalar_action | SetISub() | In-place difference: left -= right. Mutates the set; returns the set. |
| SetIXor | scalar_action | SetIXor() | In-place symmetric difference: left ^= right. Mutates the set; returns the set. |
| SetOr | scalar_query | SetOr() | Set union operator: left | right. Returns a new set. |
| SetPop | scalar_action | SetPop() | Pop arbitrary element: s.pop(). Mutates the set; returns the element. |
| SetSub | scalar_query | SetSub() | Set difference operator: left - right. Returns a new set. |
| SetUpdate | scalar_command | SetUpdate() | Update set with elements from other: s.update(other). Mutates the set; returns nothing. |
| SetXor | scalar_query | SetXor() | Set symmetric difference operator: left ^ right. Returns a new set. |
| SymmetricDifference | scalar_query | SymmetricDifference() | Set symmetric difference: left.symmetric_difference(right). Returns a new set. |
| SymmetricDifferenceUpdate | scalar_command | SymmetricDifferenceUpdate() | Keep elements in either but not both: s.symmetric_difference_update(other). |
| Union | scalar_query | Union() | Set union: left.union(right). Returns a new set. |
sequence_interactions
Module nu.forms.collections.abc.sequence_interactions.
Sequence interactions.
| Name | Sort | Call | Meaning |
|---|---|---|---|
| Append | scalar_command | Append() | Append item to end: seq.append(value). Mutates slot 0; returns nothing. |
| Count | scalar_query | Count() | Count occurrences: seq.count(value). |
| DelIndex | scalar_command | DelIndex() | Subscript delete: del seq[index]. Mutates slot 0; returns nothing. |
| Extend | scalar_command | Extend() | Extend sequence with iterable: seq.extend(other). Mutates slot 0; returns nothing. |
| First | scalar_query | First() | First element: seq[0]. Returns Invalid if empty. |
| IAdd | scalar_action | IAdd() | In-place concat: seq += other. Mutates slot 0 and returns it (Python iadd). |
| IMul | scalar_action | IMul() | In-place repeat: seq *= n. Mutates slot 0 and returns it (Python imul). |
| IndexOf | scalar_query | IndexOf() | Find index of value: seq.index(value). Returns Invalid if not found. |
| Insert | scalar_command | Insert() | Insert item at index: seq.insert(index, value). Mutates slot 0; returns nothing. |
| Last | scalar_query | Last() | Last element: seq[-1]. Returns Invalid if empty. |
| Pop | scalar_action | Pop() | Pop item at index: seq.pop(index). Mutates slot 0 and returns the popped value. |
| RemoveValue | scalar_command | RemoveValue() | Remove first occurrence of value: seq.remove(value). Mutates slot 0; returns nothing. |
| Reverse | scalar_command | Reverse() | Reverse sequence in-place: seq.reverse(). Mutates slot 0; returns nothing. |
| SetIndex | scalar_command | SetIndex() | Subscript write: seq[index] = value. Mutates slot 0; returns nothing. |
| Sort | scalar_command | Sort() | Sort sequence in-place: list.sort(). Mutates slot 0; returns nothing. |
shared_interactions
Module nu.forms.collections.abc.shared_interactions.
Shared collection mutation commands.
| Name | Sort | Call | Meaning |
|---|---|---|---|
| Clear | scalar_command | Clear() | Clear all items: collection.clear(); mutates the collection, returns nothing. |
mapping_interactions
Module nu.forms.collections.abc.mapping_interactions.
Mapping interactions.
| Name | Sort | Call | Meaning |
|---|---|---|---|
| ContainsKey | scalar_query | ContainsKey() | Test key membership: key in mapping. Yields a bool. |
| DeleteItem | scalar_command | DeleteItem() | Delete entry by key: del mapping[key]. Mutates slot 0; returns nothing. |
| DictPop | scalar_action | DictPop() | Pop value by key with optional default: mapping.pop(key, default). |
| Get | scalar_query | Get() | Get value from mapping with optional default: mapping.get_item(key, default) or mapping[key]. |
| Items | scalar_query | Items() | Get items view from mapping: mapping.items(). |
| Keys | scalar_query | Keys() | Get keys view from mapping: mapping.keys(). |
| Merge | scalar_query | Merge() | Merge two mappings into a new one: mapping | other. Yields a new dict. |
| MergeUpdate | scalar_action | MergeUpdate() | In-place merge: mapping |= other. Mutates slot 0 and yields the mapping. |
| PopItem | scalar_action | PopItem() | Pop arbitrary item: mapping.popitem(). |
| ReversedItems | scalar_query | ReversedItems() | (key, value) pairs in reverse insertion order: reversed(mapping.items()). |
| ReversedKeys | scalar_query | ReversedKeys() | Reverse-order keys: reversed(mapping). Yields keys in reverse insertion order. |
| ReversedValues | scalar_query | ReversedValues() | Values in reverse insertion order: reversed(mapping.values()). |
| SetDefault | scalar_action | SetDefault() | Set default value if key missing: mapping.setdefault(key, default). |
| Update | scalar_command | Update() | Update mapping with another: mapping.update(other). Mutates slot 0; returns nothing. |
| Values | scalar_query | Values() | Get values view from mapping: mapping.values(). |
nu.core.access
Module nu.core.access.
Access atoms: Python's item and attribute management.
| Name | Sort | Call | Meaning |
|---|---|---|---|
| SetItem | scalar_command | SetItem(target, key, value) | Subscript write: x[k] = v. |
collection
Module nu.forms.collections.abc.collection.
Collection capability.
| Name | Call | Meaning |
|---|---|---|
| CollectionForm | CollectionForm() | Base for collection values, like collections.abc.Collection. |
container
Module nu.forms.collections.abc.container.
Container capability.
| Name | Call | Meaning |
|---|---|---|
| ContainerForm | ContainerForm() | Base for values that support containment checks, like collections.abc.Container. |
iterable
Module nu.forms.collections.abc.iterable.
Iterable capability.
| Name | Call | Meaning |
|---|---|---|
| IterableForm | IterableForm() | Base for values that support iteration, like collections.abc.Iterable. |
mapping
Module nu.forms.collections.abc.mapping.
Mapping collection: bases + mutations.
| Name | Call | Meaning |
|---|---|---|
| MappingForm | MappingForm() | Base for mapping values: key lookup plus key/value/item views. |
| MutableMappingForm | MutableMappingForm() | Base for mutable mapping values: adds in-place writes over MappingForm. |
| ReactiveMappingForm | ReactiveMappingForm() | Reactive mapping: adds any-change observation over MutableMappingForm. |
sequence
Module nu.forms.collections.abc.sequence.
Sequence collection: bases + mutations.
| Name | Call | Meaning |
|---|---|---|
| MutableSequenceForm | MutableSequenceForm() | Base for in-place-mutable sequences, like collections.abc.MutableSequence. |
| ReactiveSequenceForm | ReactiveSequenceForm() | Sequence with change subscriptions layered on MutableSequenceForm. |
| SequenceForm | SequenceForm() | Base for ordered, indexable values, like collections.abc.Sequence. |
set_
Module nu.forms.collections.abc.set_.
Set collection: bases + mutations.
| Name | Call | Meaning |
|---|---|---|
| MutableSetForm | MutableSetForm() | Base for mutable set values, like collections.abc.MutableSet. |
| ReactiveSetForm | ReactiveSetForm() | Reactive set. Adds on_change() for any-change observation. |
| SetLikeForm | SetLikeForm() | Base for set values, like collections.abc.Set. |
sized
Module nu.forms.collections.abc.sized.
Sized capability.
| Name | Call | Meaning |
|---|---|---|
| SizedForm | SizedForm() | Base for values that have a length, like collections.abc.Sized. |
sliceable
Module nu.forms.collections.abc.sliceable.
Sliceable capability.
| Name | Call | Meaning |
|---|---|---|
| SliceableForm | SliceableForm() | Base for values that support slicing. |