Roland's homepage

My random knot in the Web

Articles tagged with "struct"

  1. 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.

    Using a dict subclass

    This is the shortest and most general …


Page 1 / 1