Can't get items out of a set?

Raymond Hettinger python at rcn.com
Fri Mar 7 20:20:32 CET 2008


[Cruxic]
> Is it possible to get an object out of a set() given another object
> that has the same hash code and equality (__hash__() and __eq__()
> return the same)?

Yes, but it requires an indirect approach.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/499299


Raymond



More information about the Python-list mailing list