ParamSpec: bound, covariant, contravariant
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 302
- Avg merge
- 23h
- Merged PRs (30d)
- 8
Description
I found that right now ParamSpec allows three kw-only arguments: bound=None, covariant=False, contravariant=False. Just like PEP612 states:
The runtime should accept bounds and covariant and contravariant arguments in the declaration just as typing.TypeVar does, but for now we will defer the standardization of the semantics of those options to a later PEP.
What are the use-cases for this? How can ParamSpec can be bound to a value? Or how can it be covariant? It does not seem to be semantically valid.
Maybe we should remove these arguments? What do others think?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading PEP 612 and the existing ParamSpec declaration, then review the eight-comment discussion for an agreed direction. Done requires a settled answer on whether bound, covariant, and contravariant arguments have valid semantics or should be removed, followed by the corresponding project change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100