Skip to main content

LocItem

This class represents a location item used for indexing into various data structures, supporting both string and integer keys. It enables identification of items within dictionaries, lists, tuples, and tagged unions by providing variants for string-based lookups and integer-based indexing.

Attributes

AttributeTypeDescription
SStringString type key, used to identify items from a dict or anything that implements __getitem__
PySPyBackedStrPython-owned variant of the string type key.
Ii64Integer key used to retrieve items from lists, tuples, dicts with integer keys, or tagged unions.

Constructor

Signature

def LocItem()

Signature

def S(
value: String
) - > [LocItem](locitem.md?sid=errors_location_locitem)

Parameters

NameTypeDescription
valueStringThe string key used for dictionary or attribute lookups.

Signature

def PyS(
value: PyBackedStr
) - > [LocItem](locitem.md?sid=errors_location_locitem)

Parameters

NameTypeDescription
valuePyBackedStrThe Python-managed string key used for lookups.

Signature

def I(
value: i64
) - > [LocItem](locitem.md?sid=errors_location_locitem)

Parameters

NameTypeDescription
valuei64The integer index or key used for sequence indexing or integer-mapped dictionary lookups.