Allen, allen.fowler wrote:
... > > What is that __repr__ function doing exactly? Looks interesting. > It is really useful, and yes Michael comes up with beauties like this. Produces nice print output, i.e.: print 'after flush' print con print add Will give you: after flush Contact(address=[Address(contact=Contact(address=[...], id=7, name='a name'), fk_contact=7, id=8, street='a street')], id=7, name='a name') Address(contact=Contact(address=[Address(contact=Contact(address=[...], id=7, name='a name'), fk_contact=7, id=8, street='a street')], id=7, name='a name'), fk_contact=7, id=8, street='a street') If it were not there you would get: after flush <model.Contact object at 0x022860F0> <model.Address object at 0x02286130> Werner --~--~---------~--~----~------------~-------~--~----~ 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 sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---