Antoine Pitrou added the comment:

Another possible idea is to introduce a "proxy protocol" (__proxy__ /
tp_proxy) that would be used as a fallback by PyObject_LookupSpecial to
fetch the lookup target, i.e.:

def PyObject_LookupSpecial(obj, name):
    tp = type(obj)
    try:
        return getattr(tp, name)
    except AttributeError:
        return getattr(tp.tp_proxy(), name)

(not sure that makes sense, I haven't thought very hard about it)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19359>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to