StaticIndex

class StaticIndex
Members defined in StaticIndex (11 members)

empty

R

Returns True if this index contains no indexed symbols.

__bool__

__init__

__len__

clear

clone

erase

insert

reserve

visit

visit_while

Attributes

property empty: bool

Returns True if this index contains no indexed symbols.

Methods

__bool__() → bool

Returns True if this index is not empty.

__init__() → None
__len__() → int

The number of different symbols name in this index.

clear() → None

Clear this index.

clone() → syside.StaticIndex

Clone this index. Modifications to one or the other index does not affect the other.

erase(document: syside.Document) → int

Remove all symbols exported by document from this index. Returns the number of symbols erased.

NOTE: exported symbols must first be collected into the document, and only symbols currently exported by document will be erased.

insert(document: syside.Document) → int

Add all symbols exported by document from this index. Returns the number of symbols added.

NOTE: exported symbols must first be collected into the document.

reserve(arg: int, /) → None

Reserve memory for this index. This can reduce the number of allocations performed when adding new symbols to this index.

visit(arg0: str, arg1: Callable[[syside.IndexedSymbol], None], /) → None
visit(arg0: Sequence[str], arg1: Callable[[str, syside.IndexedSymbol], None], /) → None
visit_while(arg0: str, arg1: Callable[[syside.IndexedSymbol], bool], /) → None
visit_while(arg0: Sequence[str], arg1: Callable[[str, syside.IndexedSymbol], bool], /) → None
Used in