Oleg Broytmann, el 28 de febrero a las 10:32 me escribiste:
> On Thu, Feb 28, 2008 at 02:57:50AM -0200, Sam's Lists wrote:
> > I can print the record find by coercing it into a string.
> > 
> > But I'd like to be able to iterate through it myself.  And I can't.  I keep
> > getting:  'TypeError: 'TheRun' object is not iterable'
> > 
> > Why is this the case?
> 
>    Why do you expect a record to be iterable? There is a list of column
> names, but there is no a list of values, you have to get a value for
> a column by the column's name.

Well, there is a sqlmeta asDict() method that returns a dict, so you can
do:

for v in obj.sqlmeta.asDict():
        # ...

If that's useful.

-- 
Leandro Lucarella (luca) | Blog colectivo: http://www.mazziblog.com.ar/blog/
----------------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------------
Just because you're paranoid, don't mean they're not after you.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to