Check if a given obj is a pointer (is a remote object). Args: obj (Any): Object. Returns: bool: True (if pointer) or False (if not).
(obj: Any)
| 17 | |
| 18 | |
| 19 | def ispointer(obj: Any) -> bool: |
| 20 | """Check if a given obj is a pointer (is a remote object). |
| 21 | |
| 22 | Args: |
| 23 | obj (Any): Object. |
| 24 | |
| 25 | Returns: |
| 26 | bool: True (if pointer) or False (if not). |
| 27 | """ |
| 28 | if type(obj).__name__.endswith("Pointer") and hasattr(obj, "id_at_location"): |
| 29 | return True |
| 30 | return False |
| 31 | |
| 32 | |
| 33 | def islocal(obj: Any) -> bool: |
no outgoing calls