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
| Attribute | Type | Description |
|---|---|---|
| S | String | String type key, used to identify items from a dict or anything that implements __getitem__ |
| PyS | PyBackedStr | Python-owned variant of the string type key. |
| I | i64 | Integer 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
| Name | Type | Description |
|---|---|---|
| value | String | The string key used for dictionary or attribute lookups. |
Signature
def PyS(
value: PyBackedStr
) - > [LocItem](locitem.md?sid=errors_location_locitem)
Parameters
| Name | Type | Description |
|---|---|---|
| value | PyBackedStr | The Python-managed string key used for lookups. |
Signature
def I(
value: i64
) - > [LocItem](locitem.md?sid=errors_location_locitem)
Parameters
| Name | Type | Description |
|---|---|---|
| value | i64 | The integer index or key used for sequence indexing or integer-mapped dictionary lookups. |