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

Method get_dictionary

_pydevd_bundle/pydevd_resolver.py:329–346  ·  view source on GitHub ↗
(self, dct)

Source from the content-addressed store, hash-verified

327 return ret
328
329 def get_dictionary(self, dct):
330 ret = self.init_dict()
331
332 i = 0
333 for key, val in dct.items():
334 i += 1
335 # we need to add the id because otherwise we cannot find the real object to get its contents later on.
336 key = "%s (%s)" % (self.key_to_str(key), id(key))
337 ret[key] = val
338 if i >= pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS:
339 ret[TOO_LARGE_ATTR] = TOO_LARGE_MSG % (pydevd_constants.PYDEVD_CONTAINER_RANDOM_ACCESS_MAX_ITEMS,)
340 break
341
342 # in case if the class extends built-in type and has some additional fields
343 additional_fields = defaultResolver.get_dictionary(dct)
344 ret.update(additional_fields)
345 ret[GENERATED_LEN_ATTR_NAME] = len(dct)
346 return ret
347
348
349def _apply_evaluate_name(parent_name, evaluate_name):

Callers

nothing calls this directly

Calls 5

init_dictMethod · 0.95
key_to_strMethod · 0.95
itemsMethod · 0.80
get_dictionaryMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected