"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This is by design. > > The intent is that as long as you call something that returns no > value, your last result is not thrown away. IOW _ is the last result > that wasn't None. > > Please don't change this.
What might be improved is the documentation of this, which I could not find in a few minutes of searching. As of current 2.4 docs, the Tutorial, Language, and Library manuals all have index pages for identifiers beginning with '_' but none contain '_' itself. (And none have entries for 'underscore'.) Language Reference 2.3.2 Reserved classes of identifiers lists all the other special identifier classes starting with '_' but not '_' itself. I think this would be a good place for an entry for '_' and its special meaning in interactive mode. Tutorial 2.1.2 Interactive Mode would be another place to mention the special use of '_'. If there is something I missed (that is not indexed), then I missed it. Terry Jan Reedy _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com