Mastodon Feed: Post

Mastodon Feed

jonny@neuromatch.social ("jonny (nonvenomous)") wrote:

me: "hey mypy, i want to understand how you work because i'm writing a plugin and your api is sort of a maze, do you have any docs"
mypy: "here is the wikipedia page for parsing and a few textbooks about compilers"

Mypy Development     Learning Resources: What to read if you want to understand mypy internals.
Learning Resources Jukka Lehtosalo edited this page on Jun 27, 2022 · 3 revisions You'll probably need to know a little about compilers and/or type systems to be effective working on mypy internals. In particular, understanding ASTs, parsers and symbol tables would be useful, but code generation and various optimizations less so, unless you are working on mypyc. Books Introductory texts:     The Dragon Book     Modern Compiler Implementation in Java/C (Appel) More advanced books:     Types and Programming Languages (Pierce)         This is heavier on theory Online Resources     Parsing (Wikipedia)     Abstract syntax tree (Wikipedia)     Symbol table (Wikipedia)     PEP 484 - Type Hints     PEP 483 - The Theory of Type Hints