[New-bugs-announce] [issue32352] `inspect.getfullargspec` doesn't work fine for some builtin callable objects

thautwarm report at bugs.python.org
Sun Dec 17 08:47:09 EST 2017


New submission from thautwarm <yaoxiansamma at gmail.com>:

It's quite confusing to me that `inspect.getfullargspec` crashed when it was applied on some builtin callable objects.

```
for each in __builtin__.__dict__:
    try:
        obj = getattr(__builtin__, each)
        if not callable(obj): 
            continue
        inspect.getfullargspec(obj)
    except Exception as e:
        print(each, e)
```

Here are the results:

```
__build_class__ unsupported callable
__import__ unsupported callable
dir unsupported callable
getattr unsupported callable
iter unsupported callable
max unsupported callable
min unsupported callable
next unsupported callable
print unsupported callable
round unsupported callable
vars unsupported callable
bool unsupported callable
bytearray unsupported callable
bytes unsupported callable
classmethod unsupported callable
complex unsupported callable
dict unsupported callable
enumerate unsupported callable
filter unsupported callable
float unsupported callable
frozenset unsupported callable
property unsupported callable
int unsupported callable
list unsupported callable
map unsupported callable
range unsupported callable
reversed unsupported callable
set unsupported callable
slice unsupported callable
staticmethod unsupported callable
str unsupported callable
super unsupported callable
tuple unsupported callable
type unsupported callable
zip unsupported callable
BaseException unsupported callable
Exception unsupported callable
TypeError unsupported callable
StopAsyncIteration unsupported callable
StopIteration unsupported callable
GeneratorExit unsupported callable
SystemExit unsupported callable
KeyboardInterrupt unsupported callable
ImportError unsupported callable
ModuleNotFoundError unsupported callable
OSError unsupported callable
EnvironmentError unsupported callable
IOError unsupported callable
WindowsError unsupported callable
EOFError unsupported callable
RuntimeError unsupported callable
RecursionError unsupported callable
NotImplementedError unsupported callable
NameError unsupported callable
UnboundLocalError unsupported callable
AttributeError unsupported callable
SyntaxError unsupported callable
IndentationError unsupported callable
TabError unsupported callable
LookupError unsupported callable
IndexError unsupported callable
KeyError unsupported callable
ValueError unsupported callable
UnicodeError unsupported callable
UnicodeEncodeError unsupported callable
UnicodeDecodeError unsupported callable
UnicodeTranslateError unsupported callable
AssertionError unsupported callable
ArithmeticError unsupported callable
FloatingPointError unsupported callable
OverflowError unsupported callable
ZeroDivisionError unsupported callable
SystemError unsupported callable
ReferenceError unsupported callable
BufferError unsupported callable
MemoryError unsupported callable
Warning unsupported callable
UserWarning unsupported callable
DeprecationWarning unsupported callable
PendingDeprecationWarning unsupported callable
SyntaxWarning unsupported callable
RuntimeWarning unsupported callable
FutureWarning unsupported callable
ImportWarning unsupported callable
UnicodeWarning unsupported callable
BytesWarning unsupported callable
ResourceWarning unsupported callable
ConnectionError unsupported callable
BlockingIOError unsupported callable
BrokenPipeError unsupported callable
ChildProcessError unsupported callable
ConnectionAbortedError unsupported callable
ConnectionRefusedError unsupported callable
ConnectionResetError unsupported callable
FileExistsError unsupported callable
FileNotFoundError unsupported callable
IsADirectoryError unsupported callable
NotADirectoryError unsupported callable
InterruptedError unsupported callable
PermissionError unsupported callable
ProcessLookupError unsupported callable
TimeoutError unsupported callable
```

----------
components: Library (Lib)
messages: 308488
nosy: thautwarm
priority: normal
severity: normal
status: open
title: `inspect.getfullargspec` doesn't work fine for some builtin callable objects
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32352>
_______________________________________


More information about the New-bugs-announce mailing list