On Wed, Oct 7, 2009 at 8:58 AM, Christian Boos <[email protected]> wrote:
>
> [email protected] wrote:
>> Ok, here the diff.
>>
>> Have both decorator versions in it now, but use the direct
>> run_as_transaction decorator in the tests.
>>
>>
>
> Ok, thank you and Remy for the heads up, I think I must have missed the
> double nesting, so ... right it seems this can be done after all,
> perfect :P)
>
> I have a couple of follow-up suggestions:
> - We could rename @run_as_transaction to @with_transaction, suggesting
> the evolution to using 'with' when moving to 2.5, where this will become
> "with transaction(env, db) as db: ..."
> - I think we don't need fn(db=...) here, as Remy said we can always
> get use anything from the outer scope, so no need to pass any other
> arguments besides db
> - We could return True/False/None depending on the outcome: True when
> committed, False when rollbacked, None if still within a transaction
So is that like
enum bool {
TRUE,
FALSE,
FILE_NOT_FOUND
}
?
(Sorry, sorry, I just couldn't resist. If you're a reader of
dailywtf.com it's a running joke there.)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---