This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author RPecor
Recipients RPecor, jack__d
Date 2021-07-27.23:31:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627428689.19.0.873459899874.issue44752@roundup.psfhosted.org>
In-reply-to
Content
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!
History
Date User Action Args
2021-07-27 23:31:29RPecorsetrecipients: + RPecor, jack__d
2021-07-27 23:31:29RPecorsetmessageid: <1627428689.19.0.873459899874.issue44752@roundup.psfhosted.org>
2021-07-27 23:31:29RPecorlinkissue44752 messages
2021-07-27 23:31:28RPecorcreate