Sulba
ReviewSign inAccount
Theme
Editor theme
Light
Dark

Beginner · Python for programmers

Classes and dataclasses

Port superstruct's structs to classes: a dataclass for each failure, a class for each kind of struct that shares one walk through its base class, and the special methods that join structs with a bar, test whether a value passes and show each struct as it's made.

You build
structs.py, then service.py
Stages
3 Build, 1 Catch, 1 Ship
Time
About 3.5 hours

Loading the workspace…