Returns true if `maybe_containing_ctxt` is or contains `ctxt`.
(ctxt, maybe_containing_ctxt)
| 248 | |
| 249 | |
| 250 | def IsContainingContext(ctxt, maybe_containing_ctxt): |
| 251 | """Returns true if `maybe_containing_ctxt` is or contains `ctxt`.""" |
| 252 | while ctxt is not maybe_containing_ctxt: |
| 253 | if ctxt is None: return False |
| 254 | ctxt = ctxt.outer_context |
| 255 | return True |
| 256 | |
| 257 | |
| 258 | def OpInContext(op, ctxt): |
no outgoing calls
no test coverage detected