Returns 1 if `o` is a ResourceVariable. Returns 0 otherwise. Returns -1 if an error occurred.
| 281 | // Returns 0 otherwise. |
| 282 | // Returns -1 if an error occurred. |
| 283 | int IsVariableHelper(PyObject* o) { |
| 284 | static auto* const check_cache = new CachedTypeCheck([](PyObject* to_check) { |
| 285 | return IsInstanceOfRegisteredType(to_check, "Variable"); |
| 286 | }); |
| 287 | return check_cache->CachedLookup(o); |
| 288 | } |
| 289 | |
| 290 | // Returns 1 if `o` is considered a sequence for the purposes of Flatten(). |
| 291 | // Returns 0 otherwise. |
no test coverage detected