New submission from Roman Inflianskas <infr...@gmail.com>:
I use inspect.getmembers for getting members of splinter.webdriver.BaseWebDriver. The problem is that it has a property status_code raises NotImplementedError: https://github.com/cobrateam/splinter/blob/master/splinter/driver/webdriver/__init__.py#L191. This exception passes through try block in https://github.com/python/cpython/blob/master/Lib/inspect.py#L343 because it doesn't contain: except Exception: pass section. In the result, instead of members of the object, I get an exception. I think there are two possible expected behaviors: 1. Just ignore the exceptions and return members without the members, that raise exceptions. 2. Instead of members, return tuple like: ... try: ... except Exception as e: RAISES_EXCEPTION = object() value = (RAISES_EXCEPTION, e) ... ---------- components: Library (Lib) messages: 328885 nosy: rominf priority: normal severity: normal status: open title: inspect.getmembers passes exceptions from object's properties through type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35108> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com