<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, May 9, 2017 at 7:37 PM, Nick Coghlan <span dir="ltr"><<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10 May 2017 at 08:51, Brett Cannon <<a href="mailto:brett@python.org">brett@python.org</a>> wrote:<br>
> On Tue, 9 May 2017 at 11:11 Carl Meyer <<a href="mailto:carl@oddbird.net">carl@oddbird.net</a>> wrote:<br>
</span><span class="">>> It might be nice to have a less verbose syntax for Optional, but that<br>
>> can be a separate discussion.<br>
><br>
> You should be able to do that today with `from typing import Optional as Eh`<br>
> or whatever your preferred optional/maybe name is. :)<br>
<br>
</span>While "from typing import Optional as Opt" can indeed help, perhaps<br>
PEP 505 should be updated to discuss this point in addition to the<br>
current proposals for None-aware binary operators?<br>
<br>
If it included a ? prefix operator as a shorthand for<br>
"typing.Optional[<expr>]", that would shorten affected declarations<br>
back to:<br>
<br>
def handle_employee(e: ?Employee = None) -> None: ...<br></blockquote></div><br></div><div class="gmail_extra">I really don't want to go there. And this idea should definitely not be a condition for removing the existing PEP 484 feature. Whatever gets done syntax-wise won't affect anyone who needs any kind of backward compatibility anyways, and that's very important for practical adoption of PEP 484.<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>