3 ms·
And you can even do that with dict in the most recent version of mypy. But the fact you have to import Union instead of using a pipe bothers me. It's useless b
by sametmax 7y ago
And you can even do that with dict in the most recent version of mypy.
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.
- pas 7y agoExplicit is good in Python world. 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.
- sametmax 7y agoYou are right. Let's remove the "+" operator in favor of operator.add. It's totally worth the readability. 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.