Consider a registry with a dict-like interface. Each key is a string name and each value is a class. Using it in this order works:
registry['foo'] = FooClass
cls = registry['foo']
instance = cls
But in this order it wouldn't of course:
cls = registry['foo']
registry['foo'] = FooClass
instance = cls()
To support the second use-case, I implemented a class constructor wrapper in a function but it "denaturates" the class. I mean that this won't work:
cls = registry['foo']
registry['foo'] = FooClass
issubclass(cls, FooClass)
I'd like to support that third case, so I'm looking for a better way to proxy the class registry items.