> BTW, I disagree with your arguments that Optional and Union are
> misleading names that can be easily misunderstood, especially in the
> usual context of formal arguments in function definitions.

The comment made by Jelle Zijlstra suggested to me suggested that the new 
syntax might have been a replacer for Union as well, as that is really what the 
`|` is. I want to clarify though that I do not think Union is a confusing name 
as Optional. My main argument in the first place was that Optional was a 
potentially perplexing name choice. 

> The suggestion of "Noneable" takes the Pythonic implementation of optional
> arguments (by defaulting to None) too seriously, at the expense of the
> syntactic intention: an argument that may be omitted.  Among other
> things, very frequently 'None' is *not* an allowed value in the body
> of the function

It is kind of an edge case scenario from most common applications in Python. 
Still, if someone were to allow both None and some other type, I would think 
using Optional for the naming is more incoherent when it really isn't 
"optional" if you look at the type alone based on the definition.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/HCD4PODP5XEZ3P4ZKQIEZGJL3EANRQRR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to