While this question has a python backend, the question is not tied to python itself, but rather about extension mechanisms and how to register/lookup for plugin
As you started out speaking about programming language implementation / processing, it may be worth noting that recently gcc acquired plugin capabilities too.