[sqlalchemy] Re: sqlalchemy.orm.attributes.InstrumentedList

2007-04-16 Thread Disrupt07
@svilen Thanks --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: sqlalchemy.orm.attributes.InstrumentedList

2007-04-12 Thread King Simon-NFHD78
Disrupt07 wrote What is sqlalchemy.orm.attributes.InstrumentedList? I need to use the sqlalchemy.orm.attributes.InstrumentedList type in my Python controller methods and need to check if the type of another object is of type sqlalchemy.orm.attributes.InstrumentedList. How can I do

[sqlalchemy] Re: sqlalchemy.orm.attributes.InstrumentedList

2007-04-12 Thread Disrupt07
Thanks. 'if isinstance(your_object, sqlalchemy.orm.attributes.InstrumentedList):' was helpful to me. Now I want to check if the given list is either a list of elements or a list of lists. Example: list1 = ['a', 'b', 'c'] list2 = [['a', 'b'], ['c', 'd'], ['e']] How can I check for lists within

[sqlalchemy] Re: sqlalchemy.orm.attributes.InstrumentedList

2007-04-12 Thread svilen
same way, recursively: check 1st element if mylist and isinstance( mylist[0], yourlisttype): ... or check all elements, or... On Thursday 12 April 2007 17:52:28 Disrupt07 wrote: Thanks. 'if isinstance(your_object, sqlalchemy.orm.attributes.InstrumentedList):' was helpful to me. Now I want