common
¶
Provide backend-neutral collection query nodes that frontends can target when they need common list, tuple, set, or dictionary operations without binding directly to one runtime representation.
Classes:
CollectionContains
¶
Bases: DataType
Return whether a list, tuple, or set contains a value, or whether a dictionary contains a key. attributes: base: type: astx.AST value: type: astx.AST type_: type: astx.Boolean
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/common.py
131 132 133 134 135 136 137 138 139 140 141 142 143 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/common.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
CollectionCount
¶
Bases: DataType
Return how many times a value appears in a list or tuple as an Int32 value. attributes: base: type: astx.AST value: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/common.py
243 244 245 246 247 248 249 250 251 252 253 254 255 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/common.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
CollectionIndex
¶
Bases: DataType
Return the first zero-based index of a value in a list or tuple. The initial IRx contract returns -1 when the value is not found. attributes: base: type: astx.AST value: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/common.py
187 188 189 190 191 192 193 194 195 196 197 198 199 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/common.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
CollectionIsEmpty
¶
CollectionIsEmpty(base: AST)
Bases: DataType
Return whether a list, tuple, set, or dictionary has no logical entries. attributes: base: type: astx.AST type_: type: astx.Boolean
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/common.py
81 82 83 84 85 86 87 88 89 90 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/common.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |
CollectionLength
¶
CollectionLength(base: AST)
Bases: DataType
Return the logical length of a list, tuple, set, or dictionary as an Int32 value. attributes: base: type: astx.AST type_: type: astx.Int32
Methods:
-
get_struct– -
to_json– -
to_yaml–
Source code in packages/irx/src/irx/astx/collections/common.py
35 36 37 38 39 40 41 42 43 44 | |
get_struct
¶
get_struct(simplified: bool = False) -> ReprStruct
Source code in packages/irx/src/irx/astx/collections/common.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | |
to_json
¶
Source code in packages/astx/src/astx/base.py
400 401 402 403 404 405 406 407 408 409 | |
to_yaml
¶
Source code in packages/astx/src/astx/base.py
387 388 389 390 391 392 393 394 395 396 397 398 | |