dummy, underscore and unused local variables

Chris Angelico rosuav at gmail.com
Mon Jun 13 12:41:20 EDT 2011


On Tue, Jun 14, 2011 at 2:15 AM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> On Tue, 14 Jun 2011 01:55:04 +1000, Chris Angelico wrote:
>> _ 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:

Sorry, my bad! I should have said "to the Python interactive
interpreter", the code that backs IDLE and the command line
interpreter. But in any case, it's a feature of the interactive that
doesn't apply to scripts.

ChrisA



More information about the Python-list mailing list