Alric Aneron wrote: > Hello, > I have a dictionary object and a result set object (that was returned > from a ZSQL method). Is there any way I can merge them into one > variable and use them in a dtml-in statement?
You should know which one should update which one. So assuming your dictionary has to override/extent attributes returned from ZSQL-Methods, you can write res=context.yourZSQLMethod(args...).dictionaries() # see API docs for item in res: item.update(yourdictionary) return res thats all. The other way round could be: res=context.yourZSQLMethod(args...).dictionaries() return [dict(yourdictionary,**item) for item in res] (see python docs about list comprehension and function argument forms) Regards Tino _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )