Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add __init__ to types.MethodType #1499

Merged

Conversation

sproshev
Copy link
Contributor

No description provided.

@@ -140,6 +140,7 @@ class MethodType:
__func__ = ... # type: _StaticFunctionType
__self__ = ... # type: object
__name__ = ... # type: str
def __init__(self, func: FunctionType, obj: object) -> None: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it actually accepts any Callable as the func (in both Python 2 and 3).

@JelleZijlstra JelleZijlstra merged commit 72fbc45 into python:master Jul 26, 2017
@sproshev sproshev deleted the sproshev/types.MethodType.__init__ branch July 26, 2017 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants