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

Method __repr__

Lib/doctest.py:564–573  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

562 self.lineno = lineno
563
564 def __repr__(self):
565 if len(self.examples) == 0:
566 examples = 'no examples'
567 elif len(self.examples) == 1:
568 examples = '1 example'
569 else:
570 examples = '%d examples' % len(self.examples)
571 return ('<%s %s from %s:%s (%s)>' %
572 (self.__class__.__name__,
573 self.name, self.filename, self.lineno, examples))
574
575 def __eq__(self, other):
576 if type(self) is not type(other):

Callers 1

__repr__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected