Jason Tackaberry wrote:
> On Wed, 2008-03-19 at 16:59 +0100, Dirk Meyer wrote:
>> rename class InProgressExecution to def execute (similar to twisted)
>
> I don't think I'm terribly keen on this name.  It's a bit generic given
> what it does.  I'd prefer something that makes it at least clear
> something having to do with async is happening.  Any such descriptive
> name is bound to be uglier, but at least it will be more obvious.
>
> So this calls the function and wraps it in an InProgress object.  Maybe
> something like wrap_inprogress which is, granted, pretty ugly. :(

pretty ugly

> Would it be helpful to have a decorator to make sure that anything being
> returned by the decorated function is an InProgress object?  Then it
> could implicitly do what kaa.execute does.

Maybe I should revert the change and move the execute function back
into the InProgress class. This would be more generic and can also be
used for the timed decorator.

def timed():
    ...
    async = InProgress()
    start timer with async.execute, function, *args, **kwargs
    return async


Dischi

-- 
Only Irish coffee provides in a single glass all four essential food groups --
alcohol, caffeine, sugar, and fat.
                -- Alex Levine

Attachment: pgp4gR109F6JI.pgp
Description: PGP signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to