The type of the Placeholder singleton. Used as a placeholder for partial arguments.
| 271 | |
| 272 | |
| 273 | class _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 | |
| 295 | Placeholder = _PlaceholderType() |
| 296 |
no outgoing calls
no test coverage detected
searching dependent graphs…