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

Method _make

Lib/platform.py:901–908  ·  view source on GitHub ↗
(cls, iterable)

Source from the content-addressed store, hash-verified

899
900 @classmethod
901 def _make(cls, iterable):
902 # override factory to affect length check
903 num_fields = len(cls._fields) - 1
904 result = cls.__new__(cls, *iterable)
905 if len(result) != num_fields + 1:
906 msg = f'Expected {num_fields} arguments, got {len(result)}'
907 raise TypeError(msg)
908 return result
909
910 def __getitem__(self, key):
911 return tuple(self)[key]

Callers 7

_replaceFunction · 0.45
test_instanceMethod · 0.45
test_odd_sizesMethod · 0.45
test_large_sizeMethod · 0.45
test_name_conflictsMethod · 0.45
next_tokenMethod · 0.45

Calls 1

__new__Method · 0.45

Tested by 5

test_instanceMethod · 0.36
test_odd_sizesMethod · 0.36
test_large_sizeMethod · 0.36
test_name_conflictsMethod · 0.36
next_tokenMethod · 0.36