@@ -433,6 +433,7 @@ def __setstate__(self, state):
433433_NULL = object ()
434434_UNKNOWN_DESCRIPTOR = object ()
435435_STD_METHOD_TYPES = (staticmethod , classmethod , FunctionType , partial )
436+ _ONE_PLACEHOLDER_TUPLE = (Placeholder ,)
436437
437438# Descriptor version
438439class partialmethod :
@@ -482,20 +483,19 @@ def _make_method(self):
482483 args = self .args
483484 func = self .func
484485
485- # 4 cases
486486 if isinstance (func , staticmethod ):
487487 deco = staticmethod
488488 method = partial (func .__wrapped__ , * args , ** self .keywords )
489489 elif isinstance (func , classmethod ):
490490 deco = classmethod
491- ph_args = ( Placeholder ,) if args else ()
491+ ph_args = _ONE_PLACEHOLDER_TUPLE if args else ()
492492 method = partial (func .__wrapped__ , * ph_args , * args , ** self .keywords )
493493 else :
494494 # instance method. 2 cases:
495495 # a) FunctionType | partial
496496 # b) callable object without __get__
497497 deco = None
498- ph_args = ( Placeholder ,) if args else ()
498+ ph_args = _ONE_PLACEHOLDER_TUPLE if args else ()
499499 method = partial (func , * ph_args , * args , ** self .keywords )
500500
501501 method .__partialmethod__ = self
0 commit comments