SE-0195 — Introduce User-defined "Dynamic Member Lookup" Types

It depends. If you're just wrapping the type directly that is true. But I can imagine cases where the wrapper would be a lightweight facade that may use the same member of the underlying Python type in a few different places.

If the only purpose of this feature is to sugar code within direct wrappers of dynamic types I would be strongly opposed to it. Providing sugar for that limited context is not at all worth introducing a feature with such a broad scope.

I'm pretty sure the intent is that the feature will be used more liberally. There are a variety of contexts where that tradeoff might make sense (such as ad-hoc scripts and newcomers from other languages). That is why I am not opposed to the feature, I just want to see it designed in a way that reduces the potential harm to large teams comprised of developers of mixed skill levels.

3 Likes