I would suggest writing this as "return True if `what` is either the same as (or a submodule of) `where`."