Other articles


  1. Sentinel objects and mypy type checking - 2021 July 16

    There's a few annoying edge cases with using sentinel objects with mypy. Since I think both sentinel objects are useful and mypy is useful I want to be able to use both.


    read more
  2. The fmt library - 2021 March 26

    Recently I found out about the fmt library for C++ and I like what I see (so far at least)


    read more
  3. How wide are the underlying data types for Python integers - 2021 March 11

    Here's how you can find out how many bytes wide the underlying data structures are for Python integers.


    read more
  4. Dependency management in code files is not great - 2021 January 03

    Managing dependencies via executable code files seems OK but actually turns into a massive pain, here's why.


    read more
  5. Default parameters and sentinel objects - 2020 August 18

    How you can use sentinel objects to define default parameters in Python without running into the mutable default parameter pitfall.


    read more
  6. Python's data model and intuitive operators - 2020 July 11

    Being familiar with the implications of Python's data model will help you be able to make more intuitive APIs.


    read more
  7. PyPi web API - 2020 May 12

    PyPi has a web API that will give you JSON encoded information about packages.


    read more
  8. Updating your setup.py files to the newer format - 2020 May 11

    One of the not so nice things about legacy installable python packages is the executable nature of setup.py files. This means amongst other things that you can't reliably determine the contents of some setup.py files without arbitrary code execution. This is what led to PEP 518 which specified a declarative metadata format that can be stored in easy to parse file. Updating is a pain though, but thankfully there's some tooling that makes this easier as I found out recently.


    read more
  9. Creating your own user events in pygame - 2020 April 21

    Here's how you can create your own user events in Pygame.


    read more

Page 1 / 6 »