Hi Michael,

On 6/13/07, Michael Bayer <[EMAIL PROTECTED]> wrote:
>
>
> On Jun 13, 2007, at 8:48 AM, Roger Demetrescu wrote:
> > But the use of this function is to ugly to my taste (I know, the
> > "give_me_pk_values_in_correct_order" is too big here):
> >
> > customer = session.query(Customer).get
> > (Customer.give_me_pk_values_in_correct_order(dict(columnX=3,
> > columnY=4, columnZ=343))
> >
> > Having to repeat Customer reference twic annoys me...  :)
> >
>
> its python !  its,  "there should be only one way to do it", "we're
> taking away map() and reduce() because you already have list
> comprehensions".    theres all kinds of things you might want to pass
> to get(), how would I know how you want to translate it ?

Indeed different people will have different opinions how things should work....
In my case, passing a dict() in query.get() was so intuitive to me,
that I got a little
frustrated when noticed it didn't work ... If query.get() is smart to
deal with a sequence (eg: list or tuple), why it shouldn't be with a
mapping ?   :)

Anyway, a couple of custom utilities functions will definitely do the job here..

Cheers,

Roger



> >
>

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to