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

Class _PlaceholderType

Lib/functools.py:273–293  ·  view source on GitHub ↗

The type of the Placeholder singleton. Used as a placeholder for partial arguments.

Source from the content-addressed store, hash-verified

271
272
273class _PlaceholderType:
274 """The type of the Placeholder singleton.
275
276 Used as a placeholder for partial arguments.
277 """
278 __instance = None
279 __slots__ = ()
280
281 def __init_subclass__(cls, *args, **kwargs):
282 raise TypeError(f"type '{cls.__name__}' is not an acceptable base type")
283
284 def __new__(cls):
285 if cls.__instance is None:
286 cls.__instance = object.__new__(cls)
287 return cls.__instance
288
289 def __repr__(self):
290 return 'Placeholder'
291
292 def __reduce__(self):
293 return 'Placeholder'
294
295Placeholder = _PlaceholderType()
296

Callers 1

functools.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…