<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 6, 2017 at 10:36 PM, Stéfane Fermigier <span dir="ltr"><<a href="mailto:sf@fermigier.com" target="_blank">sf@fermigier.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Nov 7, 2017 at 2:58 AM, Guido van Rossum <span dir="ltr"><<a href="mailto:guido@python.org" target="_blank">guido@python.org</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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="m_2469706551119843501gmail-">On Mon, Nov 6, 2017 at 2:34 AM, Stéfane Fermigier <span dir="ltr"><<a href="mailto:sf@fermigier.com" target="_blank">sf@fermigier.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 dir="ltr"><div>4) 10 years ago, when I was working on the EDOS project ( <a href="http://cordis.europa.eu/pub/ist/docs/directorate_d/st-ds/edos-project-story_en.pdf" target="_blank">http://cordis.europa.eu/pub/is<wbr>t/docs/directorate_d/st-ds/edo<wbr>s-project-story_en.pdf</a> ), I ran a small experiment where I used, IIRC, the profile hook to intercept all function / method calls, and log information about arguments and return value types to a gigantic log file. Then the log file could be parsed and these information used to suggest type annotations. Except there were no type annotations at the time in Python.</div><div><br></div><div>I know PyCharm can do a similar thing now: you run your program or your tests under the debugger, it logs runtime type information somewhere, and then can use it to suggest autocompletion or maybe type annotations.</div></div></blockquote><div><br></div></span><div>I didn't know this. Do you know where there are docs for this feature?<br></div></div></div></div></blockquote><div><br></div></span><div>This was described in this blog post when first introduced:</div><div><br></div><div><a href="https://blog.jetbrains.com/pycharm/2013/02/dynamic-runtime-type-inference-in-pycharm-2-7/" target="_blank">https://blog.jetbrains.com/<wbr>pycharm/2013/02/dynamic-<wbr>runtime-type-inference-in-<wbr>pycharm-2-7/</a></div><div><br></div><div>And more tersely, in the documentation: <a href="https://www.jetbrains.com/help/pycharm/python-debugger.html" target="_blank">https://www.<wbr>jetbrains.com/help/pycharm/<wbr>python-debugger.html</a></div></div></div></div></blockquote><div> </div><div>Oh. It sounds like it doesn't generate stubs or PEP 484 annotations.<br></div></div><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>