https://github.com/python/cpython
Revision edb59d57188e5535729c3948d673d0de1b729c05 authored by Martijn Pieters on 15 February 2024, 11:08:45 UTC, committed by GitHub on 15 February 2024, 11:08:45 UTC
* bpo-38364: unwrap partialmethods just like we unwrap partials

The inspect.isgeneratorfunction, inspect.iscoroutinefunction and inspect.isasyncgenfunction already unwrap functools.partial objects, this patch adds support for partialmethod objects as well.

Also: Rename _partialmethod to __partialmethod__.
Since we're checking this attribute on arbitrary function-like objects,
we should use the namespace reserved for core Python.

---------

Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 9e3729b
Raw File
Tip revision: edb59d57188e5535729c3948d673d0de1b729c05 authored by Martijn Pieters on 15 February 2024, 11:08:45 UTC
bpo-38364: unwrap partialmethods just like we unwrap partials (#16600)
Tip revision: edb59d5
.editorconfig
root = true

[*.{py,c,cpp,h,js,rst,md,yml}]
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space

[*.{py,c,cpp,h}]
indent_size = 4

[*.rst]
indent_size = 3

[*.{js,yml}]
indent_size = 2
back to top