Re: [SQLObject] Iterating through a record...

2008-02-28 Thread Sam's Lists
I expect it to be iterable because most Python objects are iterable. :) It makes using them easy. I guess there are a few things it could return if it was iterable: 1) It could return a a column name. This would be useful if sqlobject also allowed you to use subscript notation to get a value.

Re: [SQLObject] Iterating through a record...

2008-02-28 Thread Oleg Broytmann
On Thu, Feb 28, 2008 at 10:50:13AM -0200, Leandro Lucarella wrote: > Well, there is a sqlmeta asDict() method that returns a dict asDict() returns a dict of plain columns + id, but it lacks "magic attributes" (properties). Oleg. -- Oleg Broytmannhttp://phd.pp.ru/[

Re: [SQLObject] Iterating through a record...

2008-02-28 Thread Leandro Lucarella
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: 'Th

Re: [SQLObject] Iterating through a record...

2008-02-27 Thread Oleg Broytmann
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 yo

[SQLObject] Iterating through a record...

2008-02-27 Thread Sam's Lists
So I have a record which I get like so: record = TheRun.byUuidRun(uuid) In fact I don't think it really matters how I get it...I also tried selecting by id number, and it didn't make a difference. I can print the record find by coercing it into a string. But I'd like to be able to iterate throu