Check if any value exists in variable table. Parameters ---------- value : Any The value of variable. Returns ------- res : bool The existence of the value.
(self, value: Any)
| 311 | return result |
| 312 | |
| 313 | def exist(self, value: Any) -> bool: |
| 314 | """Check if any value exists in variable table. |
| 315 | |
| 316 | Parameters |
| 317 | ---------- |
| 318 | value : Any |
| 319 | The value of variable. |
| 320 | |
| 321 | Returns |
| 322 | ------- |
| 323 | res : bool |
| 324 | The existence of the value. |
| 325 | """ |
| 326 | return any( |
| 327 | value.same_as(known_value) |
| 328 | for known_value_stack in self.name2value.values() |
| 329 | for known_value in known_value_stack |
| 330 | ) |
| 331 | |
| 332 | |
| 333 | def _dispatch_wrapper(func: dispatch.ParseMethod) -> dispatch.ParseMethod: |