[email protected] wrote: > Then why does this not happen to the env parameter? This is what drives me > crazy: the env is available troughout, the db is not, despite both being > exactly the same in their usage. >
Please re-read what I wrote, it's because of the assignment `db = env.get_db_cnx()`. As you don't assign to env, it doesn't become a variable local to the "transaction" local function but is obtained from the outer scope. See http://docs.python.org/reference/executionmodel.html#naming "If a name binding operation occurs anywhere within a code block, all uses of the name within the block are treated as references to the current block ... " -- Christian PS: your MUA has some mail threading issues ... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/trac-dev?hl=en -~----------~----~----~----~------~----~------~--~---
