Handle special object NotImplemented like type (like it done for None)
Open
Nobody has claimed this yet.
topic: feature
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 302
- Avg merge
- 23h
- Merged PRs (30d)
- 8
Description
Currently incorrect, but useful to be supported:
def fun() -> Union[bool, NotImplemented]: ...
This will better explain expected, than:
def fun() -> Union[bool, Any]: ...
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 reviewing how the project currently handles None as a special object in type expressions. Compare that behavior with the proposed Union[bool, NotImplemented] example and determine the typing semantics needed; done means NotImplemented is supported in the intended type position and communicates the expected return possibility more precisely than Any.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100