3 ms·
Python has first-class type objects. That's not the same thing as writing: pickle._getattribute(__import__(package), path) everywhere, which is basically ho
by wizzwizz4 4y ago
Python has first-class type objects. That's not the same thing as writing:
pickle._getattribute(__import__(package), path)
everywhere, which is basically how Java reflection works half the time. In Python, you'd have something like copyreg.dispatch_table, and have plugin modules that register themselves in the table at load-time – limiting your attack surface to the modules you expect to be attack surface, rather than every single package accessible to the JVM.