Almost dependent typechecking in Python
In this post I evolve the idea of typechecking Python code by using the ast module introduced at Polymorphic Typechecking in Python by Unification , but instead of using unification I use evaluation to compare the types. The code that we will typecheck can be found here and the typechecker here . To run the typechecker and the tests clone the repo and do this: # running the typechecker python pydepcheck.py pydepchecktest.py # running the tests (you need pytest installed) pytest pydepchecktest.py I will not
评论
?
参与讨论