On 2008-01-17 15:11, Dirk Meyer wrote:
> Gentoo still uses 2.4 and 2.5 is still masked. I have no idea why they
> still keep it.
Not sure either. It's not like 2.5 is new.
> Python 2.4 is a mimimum because kaa uses decorators at some points and
> you can't install decorated code even if you do not call it. The same
> would be true for 'foo = yield something' which will fail to install
> on Python < 2.5.
Well, kaa.base doesn't use decorators at least. But I take your point.
We could support the 'foo = yield something' syntax in kaa.base without
actually having to use it anywhere in kaa. You could elect to use it in
freevo if you decide to target 2.5 with freevo.
>> @kaa.yield_execution()
>> def foo():
>> try:
>> result = yield some_async_func()
>> except Exception:
>> ...
>>
>
>
> But I don't need a try/except. If I don't have it, the exception
> should be raised to the InProgress object around foo.
In this case, any unhandled exceptions would bubble up to the caller of
foo.next.
> You don't need that. The follwoing works fine:
>
> @kaa.yield_execution()
> def foo():
> def handle_exception(type, value, tb):
> ...
> ip = some_async_func()
> yield ip
> try:
> result = ip()
> except Exception:
> ...
>
This is nicer, true. Although the python 2.5 syntax is better still
since the original call stack where the exception occurred is retained.
> everything that returns an InProgress. So some_async_func can also be
> Process('callme').start(). That is the reason why I added InProgress
> objects all around the code.
Right, it's a good design, we just need to carve off some of the rough
edges. :)
-------------------------------------------------------------------------
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-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel