[issue41394] Behiavior of '_' strange in shell
Rémi Lapeyre
report at bugs.python.org
Sat Jul 25 09:09:45 EDT 2020
Rémi Lapeyre <remi.lapeyre at henki.fr> added the comment:
Hi wyz23x2, did you do that from a clean interpreter?
_ is set to the last non-None result: https://github.com/python/cpython/blob/dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0/Python/sysmodule.c#L690-L696
So what you are seeing is that (None and True) is None, but _ is set to some value that you got from a previous input.
I think the component for this report is "Interpreter core".
----------
components: +Interpreter Core
nosy: +remi.lapeyre
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41394>
_______________________________________
More information about the Python-bugs-list
mailing list