Ryan Pecor <r...@pecor.com> added the comment:
It looks to me like the issue is caused by the eval() in line 155 of the rlcompleter.py file (https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Lib/rlcompleter.py#L155) which runs the function in order to see if it runs or raises an exception. I thought maybe replacing it with hasattr() might work, but it looks like the issue is repeated there as well! >>> hasattr(bar, "print_value") Foo has a value of 4 True This goes over to the C side of things now (https://github.com/python/cpython/blob/196998e220d6ca030e5a1c8ad63fcaed8e049a98/Python/bltinmodule.c#L1162) and I'll put in another issue regarding that! ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44752> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com