betty.collection.sequence.adapter module¶
Adapters between Betty and Python sequences.
- class betty.collection.sequence.adapter.MutableResolvedSequenceAdapter¶
Bases:
ResolvedSequenceAdapter,MutableResolvedSequence,GenericDecorate another sequence to resolve any values before proxying them.
- __init__(upstream: MutableSequence, *, value_resolver: Callable[[ValueT | ResolvableValueT], ValueT])¶
- class betty.collection.sequence.adapter.ResolvedSequenceAdapter¶
-
Decorate another sequence to resolve any values before proxying them.
- index(value[, start[, stop]]) integer -- return first index of value.¶
Raises ValueError if the value is not present.
Supporting start and stop arguments is optional, but recommended.