[Python-ideas] Possible enhancement to typing
sf at fermigier.com
Mon Nov 6 05:47:31 EST 2017
On Mon, Nov 6, 2017 at 11:34 AM, Stéfane Fermigier <sf at fermigier.com> wrote:
> Now I believe something could be done along the lines:
> a) record runtime type information from test or regular runs
> b) massage these information and use them to annotate Python code with
> additional type information (up to the developer to then accept or not the
> proposed changes)
> c) also run a test suite or an app under some magical machinery, and
> either raise a TypeError or log warnings when discrepancies are detected
> between type annotation and runtime behaviour.
> [...] (a) and (b) would use similar machinery,
I mean, (a) and (c)
> and (a), (b) and (c) would be probably a useful way to introduce type
> annotations to an existing code base without too much risk.
> (a) and (b) could also provide data for an interesting SE research project.
Similar to "Measuring Polymorphism in Python Programs", by Beatrice
Akerblom and Tobias Wrigstad:
Stefane Fermigier - http://fermigier.com/ - http://twitter.com/sfermigier -
Founder & CEO, Abilian - Enterprise Social Software -
Chairman, Free&OSS Group / Systematic Cluster -
Co-Chairman, National Council for Free & Open Source Software (CNLL) -
Founder & Organiser, PyData Paris - http://pydata.fr/
“You never change things by ﬁghting the existing reality. To change
something, build a new model that makes the existing model obsolete.” — R.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas