Message408717
root@debian:/workspace/cpython# ./python
Python 3.11.0a3+ (heads/main-dirty:b123ad8030, Dec 16 2021, 06:16:15) [GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import inspect
>>> class Foo:
... def __getattr__(self, attr):
... return None
...
>>> inspect.getmembers(Foo())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/workspace/cpython/Lib/inspect.py", line 488, in getmembers
return _getmembers(object, predicate, getattr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/cpython/Lib/inspect.py", line 455, in _getmembers
for base in object.__bases__:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not iterable |
|
Date |
User |
Action |
Args |
2021-12-16 15:40:43 | hongweipeng | set | recipients:
+ hongweipeng |
2021-12-16 15:40:43 | hongweipeng | set | messageid: <1639669243.89.0.636826061264.issue46103@roundup.psfhosted.org> |
2021-12-16 15:40:43 | hongweipeng | link | issue46103 messages |
2021-12-16 15:40:43 | hongweipeng | create | |
|