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

Method get_dictionary

_pydevd_bundle/pydevd_resolver.py:576–589  ·  view source on GitHub ↗
(self, var)

Source from the content-addressed store, hash-verified

574 raise UnableToResolveVariableException("Unable to resolve %s in %s" % (attribute, var))
575
576 def get_dictionary(self, var):
577 d = {}
578 for i, item in enumerate(var):
579 d[str(id(item))] = item
580
581 if i >= pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS:
582 d[TOO_LARGE_ATTR] = TOO_LARGE_MSG % (pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS,)
583 break
584
585 # in case if the class extends built-in type and has some additional fields
586 additional_fields = defaultResolver.get_dictionary(var)
587 d.update(additional_fields)
588 d[GENERATED_LEN_ATTR_NAME] = len(var)
589 return d
590
591 def change_var_from_name(self, container, name, new_value):
592 # The name given in this case must be the id(item), so, we can actually

Callers

nothing calls this directly

Calls 2

get_dictionaryMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected