mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
gh-127537: Add __class_getitem__ to the python implementation of functools.partial (#127537)
This commit is contained in:
parent
ea2b53739f
commit
401bba6b58
3 changed files with 14 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue