Structures in Python
Sometimes I miss the C’s plain old struct
in Python.
Of course Python has dictionaries, but I prefer to write a.b
over a['b']
.
Here are several ways of doing something akin to a struct
in Python.
Sometimes I miss the C’s plain old struct
in Python.
Of course Python has dictionaries, but I prefer to write a.b
over a['b']
.
Here are several ways of doing something akin to a struct
in Python.