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

Function _partial_prepare_merger

Lib/functools.py:297–311  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

295Placeholder = _PlaceholderType()
296
297def _partial_prepare_merger(args):
298 if not args:
299 return 0, None
300 nargs = len(args)
301 order = []
302 j = nargs
303 for i, a in enumerate(args):
304 if a is Placeholder:
305 order.append(j)
306 j += 1
307 else:
308 order.append(i)
309 phcount = j - nargs
310 merger = itemgetter(*order) if phcount else None
311 return phcount, merger
312
313def _partial_new(cls, func, /, *args, **keywords):
314 if issubclass(cls, partial):

Callers 2

_partial_newFunction · 0.85
__setstate__Method · 0.85

Calls 3

itemgetterClass · 0.90
enumerateFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…