<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jan 22, 2015 at 1:45 PM, Ed Kellett <span dir="ltr"><<a href="mailto:edk141@gmail.com" target="_blank">edk141@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><span class="">On Thu Jan 22 2015 at 20:05:41 Guido van Rossum <<a href="mailto:guido@python.org" target="_blank">guido@python.org</a>> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>This paragraph (and a some words you wrote earlier) feels really offensive to me. I am doing the best I can. I have listened to an *enormous* amount of feedback and if you read back earlier discussions (going back to I believe September or October 2014) or skim the <a href="https://github.com/ambv/typehinting/issues" target="_blank">typehinting issue tracker</a> you'll find that I am taking the feedback very seriously.<br></div></div></div></div></blockquote><div><br></div></span><div>I'm sorry. I don't mean to minimize the work you've put into this, and in any case there was no call to speak so unconstructively.</div></div></blockquote><div><br></div><div>Apology accepted!<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>The only situation where there may be a desire to change something (the minimal thing being to add a "# type: OFF" comment at the top of a module) is when a library that uses annotations for non-type-hinting purposes is used by an application (or another library) that wants to use type hints, and the user who is running the type checker cannot live with the noise output spewed by the type checker for that library.<br></div></div></div></div></blockquote><div><br></div></span><div>This is more or less the situation I imagined. Or, more problematic - the user running the type checker might assume the library is no good because it sets off the warnings.</div></div></blockquote><div><br></div><div>Hopefully it'll be a while before users who are that clueless will figure out how to run the type checker. :-)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Finally. In the distant future there may be more agreement about the use of annotations for type hints, and users will start asking library authors to change their code. But that's no different than other evolution of the language -- it won't happen overnight, you will get ample warning (DeprecationWarning :-), and the principle of supply and demand will apply. Heck, if you're not using Python 3, you're safe until 2020.</div></div></div></div></blockquote><div><br></div></span><div>I understand that it's a long way off, but in my view that'd be a regression: I know not many things are using annotations at the moment, but where they are used they fit really well (extra information for command-line-ifying a function being the one I have most experience with). It seems a shame to throw away something so neat when it feels as if the different use cases could coexist peacefully. <br></div></div></blockquote></div><br></div><div class="gmail_extra">Yes, I am well aware that it's a regression. Regressions are taken seriously; see e.g. PEP 4, which describes the deprecation process for modules. It's much the same for language features. But that doesn't mean we don't sometimes decide to change our mind. (And this isn't limited to major version number transitions like Python 2 -> 3.)<br><br></div><div class="gmail_extra">This is one of those cases. I expect (or hope?) that at some point in the distant future users who see an annotation will know that it is a type hint, without having to figure out whether may be there is a decorator or some other less-visible mechanism (e.g. a metaclass, shudder) that gives it a different meaning. I believe that this is a more desirable future than one in which type hints have to compete with other meta-information for arguments for their syntactic position.<br><br></div><div class="gmail_extra">At the same time -- let me emphasize this one more time -- I hope there will never be a time in the future where type hints are mandatory or otherwise always expected to exist. (If you want that you should probably switch to Java sooner rather than later. :-)<br><br></div><div class="gmail_extra">And lastly, such a future is a long way off, and in 3.5 your code won't break.<br></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)</div>
</div></div>