On Wed, Dec 1, 2021 at 9:24 AM Paul Moore <p.f.mo...@gmail.com> wrote:

> I think that the only
> thing I might use it for is to make it easier to annotate defaults (as
> f(a: list[int] => []) rather than as f(a: list[int] | None = None).
>

Why not `f(a: Optional[list[int]] = None)`?

I'm not counting characters, but that form seems to express the intention
better than either of the others IMHO.

-- 
Keeping medicines from the bloodstreams of the sick; food
from the bellies of the hungry; books from the hands of the
uneducated; technology from the underdeveloped; and putting
advocates of freedom in prisons.  Intellectual property is
to the 21st century what the slave trade was to the 16th.
_______________________________________________
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/OZIDF3NNW4TDFBECXQTJI6MGCILWAYGF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to