Practice ยท 2 of 2
The plugin registry
Implement collect_plugins(registry, group) โ registry maps group names to lists of (package, plugin_name, factory) tuples:
- returns {plugin_name: factory} for that group
- a duplicate plugin name raises ValueError('duplicate plugin: <name>') โ silent shadowing is how plugin bugs hide
- factories are returned, never called
This is the entry-points mechanism (and the Module-2 registry) in miniature.
Difficulty: advanced
Press Submit to check your solution.
Back to lesson: Practice: Packaging Drills