Skip to content

Help

borrow_mut

borrow_mut(ls: list)

Context manager to temporarily allow mutating a list.

Usage
1
2
with borrow_mut(struct.ls):
    struct.ls.append(...)

Parameters:

  • ls (list) –

    The list

set_mut

set_mut(ls: list, val: bool)

Set the mutability for a list.

Parameters:

  • ls (list) –

    The list

  • val (bool) –

    If set to False, disallow methods like append or extend on the provided list

ret

ret(val) -> Retriever

Type cast a value as a Retriever. Use this when operating on a retriever object itself i.e. when a property is accessed from the class instead of an instance

ref

ref(val) -> RetrieverRef

Type cast a value as a Reference. Use this when operating on a reference object itself i.e. when a property is accessed from the class instead of an instance

com

com(val) -> RetrieverCombiner

Type cast a value as a Combiner. Use this when operating on a combiner object itself i.e. when a property is accessed from the class instead of an instance