Re: Hashable object with self references OR how to create a tuple that refers to itself

2012-06-18 Thread Duncan Booth
Dieter Maurer wrote: > You can create a tuple in "C" and then put a reference to itself into > it, but I am quite convinced that you cannot do it in Python itself. > (Of course, you could use "cython" to generate C code with a source > language very similar to Python). I don't think you can even

RE: Hashable object with self references OR how to create a tuple that refers to itself

2012-06-15 Thread Prasad, Ramit
> > I am trying to create a collection of hashable objects, where each > > object contains references to > > other objects in the collection. The references may be circular. > > > > To simplify, one can define > > x= list() > > x.append(x) > > which satisfies x == [x]. > > Can I create a s

Re: Hashable object with self references OR how to create a tuple that refers to itself

2012-06-15 Thread Dieter Maurer
"Edward C. Jones" writes: > I am trying to create a collection of hashable objects, where each > object contains references to > other objects in the collection. The references may be circular. > > To simplify, one can define > x= list() > x.append(x) > which satisfies x == [x]. > Can I

Hashable object with self references OR how to create a tuple that refers to itself

2012-06-15 Thread Edward C. Jones
I am trying to create a collection of hashable objects, where each object contains references to other objects in the collection. The references may be circular. To simplify, one can define x= list() x.append(x) which satisfies x == [x]. Can I create a similar object for tuples which sa