Skip to main content

PathItem

This class represents an individual component within a path, used for navigating data structures. It supports string-based keys for mapping access and integer-based indices for retrieving items from lists, tuples, or dictionaries with integer keys.

Attributes

AttributeTypeDescription
S[PathItemString](pathitemstring.md?sid=lookup_key_pathitemstring)Stores a PathItemString representing a string-based key or attribute name used for path navigation.
PosusizeInteger key used to get items from a list, tuple, or a dictionary with integer keys.
NegusizeNegative integer index used for reverse-order access to items in a sequence.

Constructor

Signature

def S(
value: [PathItemString](pathitemstring.md?sid=lookup_key_pathitemstring)
) - > [PathItem](pathitem.md?sid=lookup_key_pathitem)

Parameters

NameTypeDescription
value[PathItemString](pathitemstring.md?sid=lookup_key_pathitemstring)The string identifier used to locate a specific property or mapping entry.

Signature

def Pos(
index: usize
) - > [PathItem](pathitem.md?sid=lookup_key_pathitem)

Parameters

NameTypeDescription
indexusizeThe zero-based positive index used to retrieve an item from a sequence or integer-keyed mapping.

Signature

def Neg(
index: usize
) - > [PathItem](pathitem.md?sid=lookup_key_pathitem)

Parameters

NameTypeDescription
indexusizeThe absolute value of the negative index used to access elements from the end of a sequence.