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?
Neil
___
Python-Dev mailing list
Python-Dev@python.org
On 3/6/06, Neil Schemenauer [EMAIL PROTECTED] wrote:
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?
Yeah, that would be the place for them. But would it be more helpful
to
[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)
On 3/6/06, Raymond Hettinger [EMAIL PROTECTED] wrote:
[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
On Mon, Mar 06, 2006, Guido van Rossum wrote:
On 3/6/06, Raymond Hettinger [EMAIL PROTECTED] wrote:
[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?
On Mar 6, 2006, at 4:14 PM, Guido van Rossum wrote:
On 3/6/06, Raymond Hettinger [EMAIL PROTECTED] wrote:
[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
On Mar 6, 2006, at 4:43 PM, Bob Ippolito wrote:
On Mar 6, 2006, at 4:14 PM, Guido van Rossum wrote:
...
I wonder if this use case and the frequently requested
case-insensitive dict don't have some kind of generalization in
common
-- perhaps a dict that takes a key function a la
Guido van Rossum wrote:
On 3/6/06, Raymond Hettinger [EMAIL PROTECTED] wrote:
[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