4 ms·
> big libraries are all designed to use reflection to present an API they consider usable. whistles in python
by strbean 4y ago
> big libraries are all designed to use reflection to present an API they consider usable.
whistles in python
- wizzwizz4 4y agoPython 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.