Path

class Path

A sequence of path segments that stringifies with unrestricted names as needed. Similar to QualifiedName but may contain indices to unnamed elements, that are printed literally with / separator instead.

Note that indices are expected to use 1-based indexing according to the specification.

Members defined in Path (18 members)

to_owning_membership

RW

If this is true, this path is to the owning membership of the element the segments would resolve to. This is a flag rather than a segment since owning memberships can effectively only ever be the last segment. When formatted, this will add /owningMembership suffix.

__bool__

__contains__

__delitem__

__getitem__

__init__

__iter__

__len__

__repr__

__setitem__

__str__

append

clear

count

extend

insert

pop

remove

Attributes

property to_owning_membership: bool

If this is true, this path is to the owning membership of the element the segments would resolve to. This is a flag rather than a segment since owning memberships can effectively only ever be the last segment. When formatted, this will add /owningMembership suffix.

Methods

__bool__() → bool

Check whether the vector is nonempty

__contains__(arg: str | int, /) → bool
__contains__(arg: object, /) → bool
__delitem__(arg: int, /) → None
__delitem__(arg: slice, /) → None
__getitem__(index: int) → str | int
__getitem__(index: slice) → syside.Path
__init__() → None

Default constructor

__init__(arg: syside.Path) → None

Copy constructor

__init__(arg: Iterable[str | int], /) → None

Construct from an iterable object

__iter__() → Iterator[str | int]
__len__() → int
__repr__() → str
__setitem__(arg0: int, arg1: str | int, /) → None
__setitem__(arg0: slice, arg1: syside.Path, /) → None
__str__() → str
append(arg: str | int, /) → None

Append arg to the end of the list.

clear() → None

Remove all items from list.

count(arg: str | int, /) → int

Return number of occurrences of arg.

extend(arg: syside.Path, /) → None

Extend self by appending elements from arg.

insert(arg0: int, arg1: str | int, /) → None

Insert object arg1 before index arg0.

pop(index: int = -1) → str | int

Remove and return item at index (default last).

remove(arg: str | int, /) → None

Remove first occurrence of arg.

Used in