MCPcopy Index your code
hub / github.com/RustPython/RustPython / __repr__

Method __repr__

Lib/argparse.py:118–131  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

116 """
117
118 def __repr__(self):
119 type_name = type(self).__name__
120 arg_strings = []
121 star_args = {}
122 for arg in self._get_args():
123 arg_strings.append(repr(arg))
124 for name, value in self._get_kwargs():
125 if name.isidentifier():
126 arg_strings.append('%s=%r' % (name, value))
127 else:
128 star_args[name] = value
129 if star_args:
130 arg_strings.append('**%s' % repr(star_args))
131 return '%s(%s)' % (type_name, ', '.join(arg_strings))
132
133 def _get_kwargs(self):
134 return list(self.__dict__.items())

Callers

nothing calls this directly

Calls 6

_get_argsMethod · 0.95
_get_kwargsMethod · 0.95
reprFunction · 0.85
appendMethod · 0.45
isidentifierMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected