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

Method __init__

Lib/test/test_struct.py:839–840  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

837 # Regression test for https://github.com/python/cpython/issues/112358
838 class MyStruct(struct.Struct):
839 def __init__(self, *args, **kwargs):
840 super().__init__('>h')
841
842 my_struct = MyStruct('>h')
843 self.assertEqual(my_struct.pack(12345), b'\x30\x39')

Callers 2

__init__Method · 0.45

Calls 1

superClass · 0.85

Tested by

no test coverage detected