> yeah, i did think native functions wouldn't fit well with it, but then
> again, i don't plan to have any c-side functions invoking python
> callbacks. i can live with that.
Just in case it isn't clear - even if you can live with it, it makes
it unsuitable for inclusion into the Python interprete
yes, well, as i suspected and as PJE pointed out, extension or builtin
functions would
make life difficult, but these are difficulties i would be willing to
accept. however, my attempts
are futile anyways, as the evaluation stack is cleared before the exception
propagates up
to the frames above...
By the way, I wouldn't call this a "continuation", as that
word implies a bit more (reusability). It's more like a
coroutine or lightweight thread.
--
Greg
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-d
tomer filiba wrote:
> the idea i came up with is, using exceptions for functional
> continuations: after all, the exception's traceback holds the entire
> context...
The problem with this is that, if the call chain has passed
through a C-implemented function at some point, the traceback
*doesn't*
On Sat, Dec 15, 2007, tomer filiba wrote:
>
> i wanted to get some feedback on the issue (i tried c.l.p, but they
> didn't understand me well enough):
python-ideas is the best place for topics like this.
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/
"Typing is che
yeah, i did think native functions wouldn't fit well with it, but then
again, i don't plan to have any c-side functions invoking python
callbacks. i can live with that. but, alas, ceval::EvalFrameEx will
clear the execution stack upon returning [1], so this couldn't work
anyway [2].
[1]
while (STA
At 01:04 AM 12/15/2007 -0800, tomer filiba wrote:
>* do you suppose it will work? are there any drawbacks i didn't
>anticipate?
Yes. :)
Specifically, think about what happens when a C function is in the
call stack, e.g.:
def f1():
return map(f2, [1,2,3])
def f2(ob):
raise WaitFor(so
i'm working on some minimalistic asynchronous framework for python,
somewhat like twisted or stackless, but for different purposes. i came
to the conclusion i want to be able to "freeze" functions, and resume
them later, when some condition is matched.
the idea i came up with is, using exceptions