Re: [pypy-dev] Object identity and dict strategies

2011-07-10 Thread Bengt Richter
On 07/09/2011 10:17 AM Armin Rigo wrote: Hi, On Sat, Jul 9, 2011 at 5:20 AM, William ML Leslie wrote: My point about small integers (...) I think that your point about small integers is broken (even assuming that smallints are enabled by default, which is not the case). It means that we'd

Re: [pypy-dev] Object identity and dict strategies

2011-07-10 Thread Armin Rigo
Hi Bengt, On Sun, Jul 10, 2011 at 3:48 PM, Bengt Richter wrote: >  >>> id([1]) == id([2]) > True As pointed out by Carl Friedrich, the real definition of "id" is: * if x and y are two variables, then "x is y" <=> "id(x) == id(y)". That's why in any Python implementation, >>> x=[1]; y=[2]; id(

Re: [pypy-dev] Object identity and dict strategies

2011-07-10 Thread Bengt Richter
On 07/10/2011 04:09 PM Armin Rigo wrote: Hi Bengt, On Sun, Jul 10, 2011 at 3:48 PM, Bengt Richter wrote: >>> id([1]) == id([2]) True True, I did write that. The key word in my line before that was `superficially' ;-) As pointed out by Carl Friedrich, the real definition of "id" is: *

Re: [pypy-dev] Object identity and dict strategies

2011-07-10 Thread Laura Creighton
What do we want to happen when somebody -- say in a C extension -- takes the id of an object that is scheduled to be removed when the gc next runs? Laura ___ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev