[Pyobjc-dev] Pure python instance -> ObjC proxy incomplete?
Brought to you by:
ronaldoussoren
From: b.bum <bb...@ma...> - 2003-10-15 17:30:22
|
In looking at OC_PythonObject.[hm], it would appear that it doesn't implement all of the NSObject protocol. In particular, we are missing.... - (BOOL)isEqual:(id)object; - (unsigned)hash; .... which is causing a bit of consternation when using mechanisms that attempt to sort collections of objects contained in ObjC collections. It would appear that isEqual: could be forwarded to the __eq__() method on the Python side, but only if the object passed in is non-nil and also an instance of OC_PythonObject? -hash would be mapped to whatever enables keys within dictionaries with the typical rule that two objects that are considered equal have the same hash? Correct? I'll have a patch shortly, but I can't commit anything until the 24th :-). b.bum |