ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved