I am getting very weird interpreter behaviour:
>>> _
True
>>> type(True)
<class 'bool'>
>>> type(_)
<class 'bool'>
I tried this because _ came up as a suggestion in Bpython, but it seems to work in the normal interpreter too. I am using
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 16 2013, 23:39:35)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Can anybody explain why _ is a substitute for True? Is it legacy, similarly to how ";" can be used to end commands, but is not necessary/encouraged?
EDIT: It seems to be random. This does not happen in a new terminal, but once I start working on something _ starts becoming true. What the hell is going on?