Introduction Two weeks ago I wrote an article about ABCs and interface enforcement. Shortly after I learned that you can do this as well with protocols. Python 3.8 introduced quite a groundbreaking feature that further advanced the language’s capabilities in type checking: the typing.Protocol which allows Python developers to define and enforce interface contracts in… Continue reading Leveraging typing.Protocol: Faster Error Detection And Beyond Inheritance
Articles on mypy
Annotate all the things! Why you should care about Python type hints …
By PyBites Team on 16 August 2022
Listen now: This week we have Will Frey on the podcast: ML engineer, Python “knowledge dictionary” and type hints fan & geek. We talk about his background, how he learns / keeps up with Python’s fast moving ecosystem and of course we look at Python’s type hints in-depth: why care and some of his favorite tricks. We… Continue reading Annotate all the things! Why you should care about Python type hints …
Abstract Syntax Trees in Python
By Alessandro Finamore on 20 February 2021
In this article Alessandro provides an overview of Abstract Syntax Trees (ASTs), introduces a few use-cases, and showcases the ast module in the Python Standard Library. The content is structured in a top-down fashion, starting from general notion about an AST, and digging deeper up to the point of artificially manipulating an AST to “randomize” the content of some instructions.
Twitter Digest 2018 Week 14
By PyBites Team on 15 April 2018
Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.
Twitter Digest 2018 Week 11
By PyBites Team on 11 March 2018
Every weekend we share a curated list of 15 cool things (mostly Python) that we found / tweeted throughout the week.