25 Sep
2014
25 Sep
'14
3:16 a.m.
Nathaniel Smith wrote on 09/25/2014 07:07 AM:
What I'd really like is for module attribute lookup to start supporting the descriptor protocol. This would be super-easy to work with and fast (you only pay the extra overhead for the attributes which have been hooked). -n
I'm not sure, I picture this the same way you intended, but I believe supporting the descriptor protocol is too confusing and breaks too much code in many cases. You wouldn't normally expect to execute x.__get__, etc on module attribute access if you are just trying to export some object x that happens to be a descriptor.