Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 674
    • Issues 674
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPyPyPy
  • pypypypy
  • Merge requests
  • !850

Implement PEP 604: Allow writing union types with the `__or__` operator

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Tadeu Zagallo requested to merge branch/py3.9-type-or into branch/py3.9 Jun 22, 2022
  • Overview 0
  • Commits 5
  • Pipelines 1
  • Changes 5

Added the __or__ operator to TypeObject, NoneObject and GenericAlias. Also had to import some of the changes lib-python/3/typing.py, and unfortunately had to diverge a little in the _UnionGenericAlias.__repr__ implementation to avoid duplicating the Union implementation as CPython did in C.

--HG-- branch : py3.9-type-or

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: branch/py3.9-type-or