But the fact you have to import Union instead of using a pipe bothers me. It's useless boilerplate and verbose. So not o Python. I reported it, but Guido told me it will not happen.
But the fact you have to import Union instead of using a pipe bothers me. It's useless boilerplate and verbose. So not o Python. I reported it, but Guido told me it will not happen.
And I have to agree with him. Just look at the mess sclalaz did/does with its use of clever pictogram-like symbol names.
Python is very much a language where newcomers are the norm. Make the source code at least a bit self-teaching seems like a good feature.
I'm sorry but "|" is not only a very commonly known operator in the entire programming world, it is already an officially supported operator by python, vastly used by the community for doing unions: sets use it, sqlalchemy use it, pandas use it.
Let's not confuse explicite and paperwork.