Yes, Chris, that is a REPL feature and one that people may use interactively.
As you note, it does not work inside something like a function which the REPL is not trying to evaluate and print. So clearly my supposed use would not make much sense in such code. -----Original Message----- From: Python-list <python-list-bounces+avi.e.gross=gmail....@python.org> On Behalf Of Chris Angelico Sent: Tuesday, November 15, 2022 6:16 PM To: python-list@python.org Subject: Re: In code, list.clear doesn't throw error - it's just ignored On Wed, 16 Nov 2022 at 10:11, <avi.e.gr...@gmail.com> wrote: > > That is clear, Cameron, but on my python interpreter values evaluated > on the command line ARE saved: > > >>> numb = 5 > >>> 5 + numb > 10 > >>> numb > 5 > >>> _ + _ + 1 > 11 That's a REPL feature. ChrisA -- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list