In the Documentation -- Session Basics, I read this: > E.g. don’t do this: > > >> ### this is the **wrong way to do it** ### > > >> class ThingOne(object): > > def go(self): > > session = Session() > > try: > > session.query(FooBar).update({"x": 5}) > > session.commit() > > except: > > session.rollback() > > raise > > >> class ThingTwo(object): > > def go(self): > > session = Session() > > try: > > session.query(Widget).update({"q": 18}) > > session.commit() > > except: > > session.rollback() > > raise > > >> def run_my_program(): > > ThingOne().go() > > ThingTwo().go()\ > >
I really can't think of any reasons/risks that the above way of doing things would incur any bad consequences. Could someone shed a little light here? Thanks a lot. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.