`functools.partialmethod` simplification
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 15/100