[issue41394] Behiavior of '_' strange in shell

2020-07-25 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: This behaviour is documented at https://docs.python.org/3/library/sys.html#sys.displayhook. -- ___ Python tracker ___

[issue41394] Behiavior of '_' strange in shell

2020-07-25 Thread Rémi Lapeyre
Rémi Lapeyre 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

[issue41394] Behiavior of '_' strange in shell

2020-07-25 Thread wyz23x2
New submission from wyz23x2 : >>> (None and True) >>> print(_) False >>> print((None and True)) # Not same?! None >>> This isn't right. P.S. What component should this be? IDLE? It's the shell, not just IDLE. Core? Not that deep! -- messages: 374260 nosy: wyz23x2 priority: normal