[Python-Dev] Re: Caching objects in memory

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Apr 27 05:34:37 CEST 2005

Facundo Batista wrote:

>>Aargh! Bad explanation. Or at least you're missing something:
> Not really. It's easier for me to show that id(3) is always the same
> and id([]) not, and let the kids see that's not so easy and you'll
> have to look deeper if you want to know better.

I think Guido was saying that it's important for them to
know that mutable objects are never in danger of being
shared, so you should at least tell them that much.
Otherwise they may end up worrying unnecessarily that
two of their lists might get shared somehow behind
their back.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list