Skip to content

Add __init__ to types.MethodType - #1499

Merged
JelleZijlstra merged 2 commits into
python:masterfrom
JetBrains:sproshev/types.MethodType.__init__
Jul 26, 2017
Merged

Add __init__ to types.MethodType#1499
JelleZijlstra merged 2 commits into
python:masterfrom
JetBrains:sproshev/types.MethodType.__init__

Conversation

@sproshev

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread stdlib/3/types.pyi Outdated
__func__ = ... # type: _StaticFunctionType
__self__ = ... # type: object
__name__ = ... # type: str
def __init__(self, func: FunctionType, obj: object) -> None: ...

Copy link
Copy Markdown
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