Antoine Pitrou added the comment: > Right, we definitely want inspect to swallow the exceptions from > descriptors. My suggestion is merely to switch the order to be: > 1. Try getattr > 2. If that throws an exception, check __dict__ directly > 3. If neither works (e.g. due to a buggy __dir__ method), ignore the > attribute entirely.
Are you talking about descriptors defined on the class or the metaclass? :-) ---------- title: inspect.getmembers and inspect.classify_class_attrs mishandle descriptors -> inspect.getmembers and inspect.classify_class_attrs mishandle descriptors _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue19030> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com