Skip to content

PEP 827: Minor updates - #5198

Open
msullivan wants to merge 3 commits into
python:mainfrom
msullivan:tweaks
Open

msullivan wants to merge 3 commits into
python:mainfrom
msullivan:tweaks

Conversation

@msullivan

Copy link
Copy Markdown
Contributor
  • Add a note about the goal of FromUnion

  • A note about property

  • Some "open questions" notes about intersections and GetMemberType

  • Change is either:

    • To a Draft PEP
    • To an Accepted or Final PEP, with Steering Council approval
    • To fix an editorial issue (markup, typo, link, header, etc)
  • PR title prefixed with PEP number (e.g. PEP 123: Summary of changes)

* Add a note about the goal of FromUnion
* A note about property
* Some "open questions" notes about intersections and GetMemberType
@msullivan
msullivan requested a review from 1st1 as a code owner October 26, 2026 18:25
@read-the-docs-community

read-the-docs-community Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 pep-previews | 🛠️ Build #35423322 | 📁 Comparing 20e1240 against latest (227e111)

  🔍 Preview build  

7 files changed · ± 7 modified

± Modified

Comment thread peps/pep-0827.rst Outdated
Comment thread peps/pep-0827.rst Outdated
which would require some more careful thought to specify.

* Would adding intersection types conflict with any of this, if they
are added? Would it be sufficient to add ``FromIntersection`` to

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this has the same problems Carl and I flagged about unions, only worse because intersections simplify much more often. Does FromIntersection[int & str] give you (int, str) or Never (since int & str = Never)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright I dropped the call for FromIntersection, and I updated FromUnion to call for simplifying unions but not for interchanging between bool and Literal[True, False] or similar.

msullivan and others added 2 commits October 26, 2026 11:56
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

This branch has not been deployed

No deployments
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.

2 participants