mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 12:35:49 +08:00
Add __name__ field to MethodType (#1442)
See https://github.com/python/cpython/blob/08c16016e2a2d1368d001ddebfe9ca92465773c4/Lib/types.py#L32-L34 ```python >>> class _C: ... def _m(self): pass ... >>> _C()._m.__name__ '_m' ```
This commit is contained in:
committed by
Jelle Zijlstra
parent
9b612c9218
commit
ac87de50dd
@@ -139,6 +139,7 @@ class _StaticFunctionType:
|
||||
class MethodType:
|
||||
__func__ = ... # type: _StaticFunctionType
|
||||
__self__ = ... # type: object
|
||||
__name__ = ... # type: str
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any: ...
|
||||
class BuiltinFunctionType:
|
||||
__self__ = ... # type: Union[object, ModuleType]
|
||||
|
||||
Reference in New Issue
Block a user