On 14 June 2018 at 12:03, Daniel Sánchez Fábregas <
daniel.sanchez.fabre...@xunta.gal> wrote:

> My idea consist in:
> Adding a method to perform type checking in traceback objects
> When printing stack traces search for mistyped arguments and warn about
> them to the user.
>
> Don't know if it is in the roadmap, but seems that have a good
> cost/benefit ratio to me.
>

It seems to me too this will be rather a work for a static type checker
like mypy.
There is a misconception that runtime objects can be attributed (or checked
w.r.t.) static types,
but this is true only in simple cases.

Also such runtime check will be not able to correctly catch many type
errors that can be
detected statically, like a wrong assignment or a Liskov violation.

--
Ivan
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to