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

Edward C. Jones edcjones at comcast.net
Fri Jun 15 11:12:18 EDT 2012


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 satisfies x == (x,)?


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /