FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add type aliases `FloatInt` and `ComplexInt` by srittau · Pull Request #16068 · python/typeshed · GitHub

Repository navigation

Add type aliases FloatInt and ComplexInt - #16068

Merged
srittau merged 1 commit into
python:mainfrom
srittau:float-int
Jul 22, 2026
Merged

srittau merged 1 commit into
python:mainfrom
srittau:float-int

Conversation

srittau commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Part of #16059

srittau mentioned this pull request Jul 22, 2026
2 of 6 tasks

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

srittau merged commit faaa858 into python:main Jul 22, 2026
73 checks passed
srittau deleted the float-int branch July 22, 2026 14:27

Copy link
Copy Markdown
Member

I feel like FloatOrInt and ComplexOrInt would be slightly more approachable names for folks seeing these types pop up in their IDE on-hover? But don't feel strongly

srittau commented Jul 22, 2026 •
edited
Loading

Copy link
Copy Markdown
Collaborator Author

I was thinking about it, but decided against it for two reasons:

  • A bit longer and harder to parse visually. And these will be very common type aliases for a while.
  • ComplexInt would need to be called ComplexOrFloatOrInt if we go the literal route.

(Also, let's try to get rid of these quickly after introduction – at least in the most commonly used places.)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL