Re: a is b
by Jitendra Gupta other posts by this author
Nov 4 2009 10:30PM messages near this date
Re: a is b
|
[ANN] Pyjamas 0.7pre1 Web Widget Set and python-to-javascript Compiler released
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@[...].com> wrote:
> On Wed, Nov 4, 2009 at 10:37 AM, Sebastian <sebas0@[...].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@python.org/msg264434.html
>
> Cheers,
> Chris
> --
> http://blog.rebertia.com
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Thread:
Sebastian
Chris Rebert
Jitendra Gupta
|