On Fri, Jun 25, 2021 at 1:54 PM Ricky Teachey firstname.lastname@example.org wrote:
Would this feature allow me to declare str objects as not iterable in some contexts?
If so, +1.
That depends. If the proposal is to intercept every attribute lookup (parallel to a class's __getattribute__ method), then yes, but if it's a fallback after default behaviour fails (like __getattr__), then no. I suspect that the latter is more likely; it's much easier to avoid recursion problems if real attributes are tried first, plus it's likely to impact performance a lot less.