(args)
| 295 | Placeholder = _PlaceholderType() |
| 296 | |
| 297 | def _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 | |
| 313 | def _partial_new(cls, func, /, *args, **keywords): |
| 314 | if issubclass(cls, partial): |
no test coverage detected
searching dependent graphs…