oh, right. what is the hash of a rowproxy exactly ? its mostly like a dict or a list, neither of which is hashable. the __hash__=<you must be explicit> thing in py3k is a great idea.
On Jan 8, 2009, at 4:17 AM, [email protected] wrote: > On Thursday 08 January 2009 03:50:15 Michael Bayer wrote: >> versus 0.5rc4 ? i didnt think we changed any of that. > > the breaking change is rev5492, the __hash__= None in RowProxy, seems > like py3k preparations. > rc4 is what, 5296? have not tried it explicitly. > > commenting that hash= makes it work. > i just happened to have such code. > a (failing) test is attached. > > svilen > >> On Jan 7, 2009, at 7:04 PM, [email protected] wrote: >>> i've upgraded and found this: >>> ... >>> q = session.execute( sometable.select() ) >>> r = set( q ) >>> TypeError: 'NoneType' object is not callable >>> >>> it took me 10 mins of trials to guess ... >>> the RowProxy does not behave well for set() of it; this is ok >>> r = set( tuple(x) for x in q ) >>> >>> i guess something about __len__ or __nonzero__ or __iter__ or ... >>> is it that new __hash__ = None ? >>> >>> svil >> >> > > > > > <rowproxy-set.py> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
