py: Tidy up a few function declarations.