In Python 3.10, the | symbol was brought to represent Union types (PEP 604). The | symbol strikes a balance between clarity, consistency, and convenience, making it a fitting choice for representing Union types in Python. It aligns with mathematical conventions, promotes concise code, and harmonizes with other programming languages, fostering a seamless developer experience.
I propose we change union types into (X | Y) during CadQuery 2.5 development cycle. For the Optional keyword, I suggest keep it as is for consistent with other programming languages and for aesthetics.
To make the change happen, the Python version requirement has to be increased to 3.10. We do not know how this influence the CadQuery ecosystem.
If the proposal is accepted, I'd like to do a pull request for the changes.
In Python 3.10, the | symbol was brought to represent Union types (PEP 604). The | symbol strikes a balance between clarity, consistency, and convenience, making it a fitting choice for representing Union types in Python. It aligns with mathematical conventions, promotes concise code, and harmonizes with other programming languages, fostering a seamless developer experience.
I propose we change union types into (X | Y) during CadQuery 2.5 development cycle. For the Optional keyword, I suggest keep it as is for consistent with other programming languages and for aesthetics.
To make the change happen, the Python version requirement has to be increased to 3.10. We do not know how this influence the CadQuery ecosystem.
If the proposal is accepted, I'd like to do a pull request for the changes.