dummy, underscore and unused local variables
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Mon Jun 13 12:15:14 EDT 2011
On Tue, 14 Jun 2011 01:55:04 +1000, Chris Angelico wrote:
> On Tue, Jun 14, 2011 at 1:37 AM, Tim Johnson <tim at johnsons-web.com>
> wrote:
>> On a related note: from the python interpreter if I do
>>>>> help(_)
>> I get
>> Help on bool object:
>>
>> class bool(int)
>> | bool(x) -> bool
>> ......
>> I'd welcome comments on this as well.
>
> _ is special to IDLE.
Not just IDLE. Also the vanilla Python command line interpreter. In fact,
you can even find the code that controls it:
help(sys.displayhook)
http://docs.python.org/library/sys.html#sys.displayhook
--
Steven
More information about the Python-list
mailing list