Re: Newbie look at Python and OO
- From: walterbyrd <walterbyrd@xxxxxxxxx>
- Date: 10 May 2007 14:11:58 -0700
Nevermind my previous question. I found the answer in "Learning
Python"
Python internally caches and reuses short strings as an optimization,
there really is just a single string, 'spam', in memory, shared by S1
and S2; hence, the is identity test reports a true result. To trigger
the normal behavior, we need to use longer strings that fall outside
the cache mechanism:
<<
.
- References:
- Newbie look at Python and OO
- From: walterbyrd
- Re: Newbie look at Python and OO
- From: Bruno Desthuilliers
- Re: Newbie look at Python and OO
- From: walterbyrd
- Newbie look at Python and OO
- Prev by Date: Re: How to installo????
- Next by Date: Re: Newbie look at Python and OO
- Previous by thread: Re: Newbie look at Python and OO
- Next by thread: Re: Newbie look at Python and OO
- Index(es):
Relevant Pages
|