MCPcopy Index your code
hub / github.com/python/cpython / __make_new

Method __make_new

Lib/annotationlib.py:430–445  ·  view source on GitHub ↗
(self, node, extra_names=None)

Source from the content-addressed store, hash-verified

428 return node
429
430 def __make_new(self, node, extra_names=None):
431 new_extra_names = {}
432 if self.__extra_names__ is not None:
433 new_extra_names.update(self.__extra_names__)
434 if extra_names is not None:
435 new_extra_names.update(extra_names)
436 stringifier = _Stringifier(
437 node,
438 self.__globals__,
439 self.__owner__,
440 self.__forward_is_class__,
441 stringifier_dict=self.__stringifier_dict__,
442 extra_names=new_extra_names or None,
443 )
444 self.__stringifier_dict__.stringifiers.append(stringifier)
445 return stringifier
446
447 # Must implement this since we set __eq__. We hash by identity so that
448 # stringifiers in dict keys are kept separate.

Callers 8

__getitem__Method · 0.95
__getattr__Method · 0.95
__call__Method · 0.95
__iter__Method · 0.95
binopMethod · 0.95
rbinopMethod · 0.95
compareMethod · 0.95
unary_opMethod · 0.95

Calls 3

_StringifierClass · 0.85
updateMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected