@erikrose yes, I wasn't sure about that myself. In the end I valued a consistent order of arguments over having a doc_type=None default value.

I wish Python would allow positional arguments after optional ones.