gh-127537: Add __class_getitem__ to the python implementation of functools.partial (#127537)

This commit is contained in:
CF Bolz-Tereick 2024-12-27 02:03:47 +01:00 committed by GitHub
parent ea2b53739f
commit 401bba6b58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 0 deletions

View file

@ -433,6 +433,9 @@ class partial:
self._phcount = phcount
self._merger = merger
__class_getitem__ = classmethod(GenericAlias)
try:
from _functools import partial, Placeholder, _PlaceholderType
except ImportError: