3 ms·
The "loader protocol" (PEP 302) is a related trick that can be used locally, so it only affects imports from packages that opt in. I use this in https://github.
by bdarnell 11y ago
The "loader protocol" (PEP 302) is a related trick that can be used locally, so it only affects imports from packages that opt in. I use this in https://github.com/bdarnell/codegenloader https://github.com/bdarnell/codegenloader to automagically process protobuf/thrift files and import the generated code.