
jitu.icfai at gmail
Nov 4, 2009, 10:29 PM
Post #3 of 3
(48 views)
Permalink
|
Hi Sebas >>> w = "q" >>>a = "q" >>>id(w) 11160864 >>>id(a) 11160864 >>> z = "big string" >>> s = "big string" >>> id(z) 13675120 >>> id(s) 13674520 This is applicable for number also.. , python caches is using same id for small numbers and string. Jitendra Kumar On Thu, Nov 5, 2009 at 12:12 AM, Chris Rebert <clp2[at]rebertia.com> wrote: > On Wed, Nov 4, 2009 at 10:37 AM, Sebastian <sebas0[at]gmail.com> wrote: > > I have a question from the pyar list that may have been discussed on > this > > list, but i didn't catch it. > > Have some common objects been somewhat hardcoded into python, like some > > integers as shown in the examples below? What other object have been > > hardcoded (strings ,etc) and what was the criteria used to select them? > Any > > hints? > > See recent thread on the subject: > http://www.mail-archive.com/python-list[at]python.org/msg264434.html > > Cheers, > Chris > -- > http://blog.rebertia.com > -- > http://mail.python.org/mailman/listinfo/python-list >
|