<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 22, 2017 at 10:44 AM, Markus Wissinger <span dir="ltr"><<a href="mailto:markus.wissinger@gmail.com" target="_blank">markus.wissinger@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 dir="ltr">Hi,<br><div><br>I have to admit I am not happy with separating the concepts of 'runtime' and 'static' types as implied by pep544. <br><br>I am currently exploring a type hint generator that produces hints out of types used in unit tests. It debugs the tests and collects the parameter types of call and return events. It ignores a type when a supertype is present. Failing isinstance/issubclass calls for protocols would hurt there. I understand that any type checker code that could provide isinstance functionality for pep544 protocols would rely on method signatures that my hint generator is just producing.<br><br>proof of concept implementation (writes method docstrings, no pep484 type hints yet):<br><a href="https://github.com/markuswissinger/ducktestpy" target="_blank">https://github.com/<wbr>markuswissinger/ducktestpy</a><br><br>This is currently just some personal project that some of you will consider a strange idea.</div></div></blockquote><div><br></div><div>Not a strange idea, I've had a similar idea and played a bit with it ~10 years ago (inspired by a Java project whose name eludes me now). </div><div><br></div><div>Also, I think PyCharm is able to do similar things (see <a href="https://blog.jetbrains.com/pycharm/2013/02/dynamic-runtime-type-inference-in-pycharm-2-7/">https://blog.jetbrains.com/pycharm/2013/02/dynamic-runtime-type-inference-in-pycharm-2-7/</a> ).</div><div><br></div><div>  S.</div><div><br></div></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Stefane Fermigier - <a href="http://fermigier.com/" target="_blank">http://fermigier.com/</a> - <a href="http://twitter.com/sfermigier" target="_blank">http://twitter.com/sfermigier</a> - <a href="http://linkedin.com/in/sfermigier" target="_blank">http://linkedin.com/in/sfermigier</a><br>Founder & CEO, Abilian - Enterprise Social Software - <a href="http://www.abilian.com/" target="_blank">http://www.abilian.com/</a><br>Chairman, Free&OSS Group / Systematic Cluster - <a href="http://www.gt-logiciel-libre.org/" target="_blank">http://www.gt-logiciel-libre.org/</a><br>Co-Chairman, National Council for Free & Open Source Software (CNLL) - <a href="http://cnll.fr/" target="_blank">http://cnll.fr/</a><div>Founder & Organiser, PyData Paris - <a href="http://pydata.fr/" target="_blank">http://pydata.fr/</a><br></div><div>---</div><div><div>“You never change things by fighting the existing reality. To change something, build a new model that makes the existing model obsolete.” <span style="font-size:12.8px">— R. Buckminster Fuller</span></div></div><div><br><br></div></div></div></div></div></div></div></div>
</div></div>