MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / resolve

Method resolve

_pydevd_bundle/pydevd_resolver.py:456–470  ·  view source on GitHub ↗

:param var: that's the original object we're dealing with. :param attribute: that's the key to resolve -- either the dict key in get_dictionary or the name in the dap protocol.

(self, var, attribute)

Source from the content-addressed store, hash-verified

454
455class TupleResolver: # to enumerate tuples and lists
456 def resolve(self, var, attribute):
457 """
458 :param var: that's the original object we're dealing with.
459 :param attribute: that's the key to resolve
460 -- either the dict key in get_dictionary or the name in the dap protocol.
461 """
462 if attribute in (GENERATED_LEN_ATTR_NAME, TOO_LARGE_ATTR):
463 return None
464 try:
465 return var[int(attribute)]
466 except:
467 if attribute == "more":
468 return MoreItems(var, pydevd_constants.PYDEVD_CONTAINER_INITIAL_EXPANDED_ITEMS)
469
470 return getattr(var, attribute)
471
472 def get_contents_debug_adapter_protocol(self, lst, fmt=None):
473 """

Callers

nothing calls this directly

Calls 1

MoreItemsClass · 0.85

Tested by

no test coverage detected