`functools.partialmethod` simplification
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 35.9k
- PR 合併指標
- PR 指標待擷取
描述
Feature or enhancement
Proposal:
Now, as partial has __get__ and Placeholder it is probably a good idea to simplify partialmethod.
So the mental model of partialmethod can simply be:
partial, which always has the first argument set to Placeholder.
So partialmethod could maybe be a subclass partial, which would potentially simplify things.
Also, maybe there is a way so that partialmethod can be made obsolete altogether.
Will see where I can get to with this.
Any ideas welcome.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
https://github.com/python/cpython/issues/121027
https://github.com/python/cpython/pull/119827#issuecomment-2190108757
Linked PRs
- gh-124788
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
Start by reading the functools.partialmethod and functools.partial entry points, including the Placeholder behavior described in the proposal. Review issue 121027 and PR 119827's discussion, then inspect linked PR 124788. Done would require resolving whether the simplification or obsolescence proposal is viable and defining the resulting implementation and compatibility changes.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- backend
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 15/100