Re: v1.0.2 question

tnb2d@henson.cs.virginia.edu
Thu, 5 May 94 09:55:41 EDT

Guido van Rossum writes:
| Tommy again, in a later message:
| > ... so 'sys.last[-1]' would be the last printed value. This
| > sounds like the only thing we'd need, so we can trash this
| > recursion-causing '_' variable and just store the last-value in
| > sys.last. Or maybe last would be the list of values and we could have
| > a separate var (sys.last_value?) to store the VERY last value printed.
|
|
| One way to almost-fix it would be to store the variable '_' in the
| module __builtin__. In that way, it can still be used without
| prefixing it with a module, but typing vars() won't go into recursion.
| (vars(__builtin__) would, but that's a lot less likely to be called --
| and sys.last_value would have the same problem with vars(sys).)
|

BINGO. Making it a member of __builtin__ would give us the
best of both worlds. The '_' can still be easily/readily availalbe
and the major recursion problem will go away. And it's not so much
that the current behavior "bothers" me, so much as it made me leary to
explore the rest of the new release when the first new thing I tried
blew up in my face! (PYTHON NEWBIES NOTE: This is NOT a common
occurrence, don't let me scare you away!)

-------> Tommy.

"Subvert the parental paradigm - Refuse Birth."