I should maybe un-PEP 8 the `isinterface` function: the rest of the file follows a "whitespace-abundance" convention.