On Thursday 08 January 2009 17:05:01 Michael Bayer wrote:
> oh, right.
>
> what is the hash of a rowproxy exactly ?    its mostly like a dict
> or a list, neither of which is hashable.
no idea. the db_id?

instead of None, better do some empty method raising some error, 
because in the current way the error comes up in not at all obvious 
fashion, takes quite some head-scratching to find-out - there's no 
mentioning of anything set() related there.

> the __hash__=<you must be 
> explicit> thing in py3k is a great idea.
i dont know, i had other similar non-obvious things around (the 
multitide of) set()-required methods, seems the protocol is not 
clearly cut like dict or list ones. maybe in py3k it will...


> On Jan 8, 2009, at 4:17 AM, a...@svilendobrev.com 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, a...@svilendobrev.com 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 sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to