On Tue, Jul 9, 2013 at 10:07 AM, Ethan Furman <et...@stoneleaf.us> wrote: > You could also do it like this: > > def updating(self): > self.transaction_active = True > return self
Yes, that would be simpler. I was all set to point out why this doesn't work, and then I noticed that the location of the "transaction_active" attribute is not consistent in the original code. The DbSession class places it on self, and then the example usage places it on the connection object (which I had based my version on). Since that seems to be a source of confusion, it demonstrates another reason why factoring this out is a good thing. -- http://mail.python.org/mailman/listinfo/python-list