[Neil Schemenauer]
>I occasionally need dictionaries or sets that use object identity
> rather than __hash__ to store items.  Would it be appropriate to add
> these to the collections module?

Why not decorate the objects with a class adding a method:
   def __hash__(self):
       return id(self)

That would seem to be more Pythonic than creating custom variants of other 
containers.


Raymond 
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to