<p dir="ltr"><br>
On 20 Apr 2015 14:44, "Barry Warsaw" <<a href="mailto:barry@python.org">barry@python.org</a>> wrote:<br>
><br>
> On Apr 20, 2015, at 07:30 PM, Harry Percival wrote:<br>
><br>
> >tldr; type hints in python source are scary. Would reserving them for stub<br>
> >files be better?<br>
><br>
> I think so.  I think PEP 8 should require stub files for stdlib modules and<br>
> strongly encourage them for 3rd party code.</p>
<p dir="ltr">+1</p>
<p dir="ltr">Having stub files take precedence over inline annotations would also neatly deal with the annotation compatibility problem (you can use a stub file to annotate code using annotations for another purpose).</p>
<p dir="ltr">Another point in favour of that approach: stub files could be evaluated holistically rather than statement at a time, permitting implicit forward references.</p>
<p dir="ltr">Cheers,<br>
Nick.<br></p>
<p dir="ltr">><br>
> Cheers,<br>
> -Barry<br>
> _______________________________________________<br>
> Python-Dev mailing list<br>
> <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/python-dev">https://mail.python.org/mailman/listinfo/python-dev</a><br>
> Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com">https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com</a><br>
</p>