"constant sharing" works differently in REPL than in script ?

Chris Angelico rosuav at gmail.com
Tue Jun 19 17:44:42 EDT 2012


On Wed, Jun 20, 2012 at 7:21 AM,  <shearichard at gmail.com> wrote:
> I liked your code Chris demoing the different ranges in different versions. I tried to write something like that myself but you did it an awful lot better !

There's no guarantee that it'll prove which are and aren't cached, but
it does seem to work. (Incidentally, it doesn't handle the case where
_no_ integers are cached.)

ChrisA



More information about the Python-list mailing list