On Thu, Jan 7, 2010 at 2:16 PM, Anand Balachandran Pillai < [email protected]> wrote:
> > > Python caches immutable objects - which is why they are immutable > Should correct myself here - this means that *all* immutables are cached. I did not mean that - what I meant that *only* immutables are cached. So read it as "Python caches some immutable objects" and skip the "which is..." part. :) > and saves memory if u reference the same immutable in many > places. So small integers, empty tuples and such are actually > cached in Python runtime, so you keep getting back the same object > and hence the same id. > > A few examples (as above). > > > _______________________________________________ BangPypers mailing list [email protected] http://mail.python.org/mailman/listinfo/bangpypers
