By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,957 Members | 2,017 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,957 IT Pros & Developers. It's quick & easy.

Change in interactive interpreter?

P: n/a
I remember the interactive interpreter used to define the name _ to
return the value of the last expression that was evaluated. However, I
tried it just today and got a NameError. Is this a change in the
interpreter or is there a configuration option I need to set to enable it?

Thanks!

--
code.py: A blog about life, the universe, and Python

http://pythonista.wordpress.com
** Posted from http://www.teranews.com **
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
The Pythonista wrote:
I remember the interactive interpreter used to define the name _ to
return the value of the last expression that was evaluated. However, I
tried it just today and got a NameError. Is this a change in the
interpreter or is there a configuration option I need to set to enable it?

Thanks!

Try again. I think you'll find it's still there -- although you have to
execute a something that returns a value before it's set for the first time.

Gary Herron
Jun 27 '08 #2

P: n/a
On Fri, 06 Jun 2008 11:36:13 -0700, Gary Herron wrote:
Try again. I think you'll find it's still there -- although you have to
execute a something that returns a value before it's set for the first
time.
That was, indeed the problem. Boy do I feel silly now. :-)

Thanks

--
code.py: A blog about life, the universe, and Python

http://pythonista.wordpress.com
** Posted from http://www.teranews.com **
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.