Python Data Classes

Source code: Lib/dataclasses.py This module provides a decorator and functions for automatically adding generated special method s such as__init__() and__repr__() to user-defined classes. It was or… Read more

Similar

Unravelling `Not` in Python

For this next blog post in my series of Python's syntactic sugar, I'm tackling what would seem to be a very simple bit of syntax, but which actually requires diving into multiple layers to fully implement: not. On the surface, the definition of not is ver... (more…)

Read more »