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

Method __eq__

Lib/test/test_argparse.py:1871–1879  ·  view source on GitHub ↗
(self, other)

Source from the content-addressed store, hash-verified

1869 self.name = name
1870
1871 def __eq__(self, other):
1872 if other in self.seen:
1873 text = self.seen[other]
1874 else:
1875 text = self.seen[other] = other.read()
1876 other.close()
1877 if not isinstance(text, str):
1878 text = text.decode('ascii')
1879 return self.name == other.name == text
1880
1881class TestFileTypeR(TempDirMixin, ParserTestCase):
1882 """Test the FileType option/argument type for reading files"""

Callers

nothing calls this directly

Calls 4

isinstanceFunction · 0.85
readMethod · 0.45
closeMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected