method gets overwritten?!
Alex Martelli
aleax at aleax.it
Fri Mar 14 09:50:13 EST 2003
Alexander Skwar wrote:
...
> Uhm, why do I get this error? Why is _ overwritten with a string? _ got
The interactive interpreter uses name _ in the __builtins__ module to store
the last non-None result from an expression-statement. You can change this
behavior by assigning sys.displayhook to your callable that does whatever
you prefer with all results from expression-statements typed at the
interactive interpreter prompt, rather than displaying and binding to name
__builtins__._ such results as the default sys.displayhook does.
Alex
More information about the Python-list
mailing list