A question to Python experts:

A generator function somehow stores the internal state (i.e., a
pointer to the current line of code and the value of local variables.
I know how to obtain the *names* of local variables, such as here:

sage: def t(n):
....:     for i in range(n):
....:         yield i
....:
sage: L = t(100)
sage: L.gi_code.co_varnames
('n', 'i')

Is it possible to retrieve or set the local variables, and perhaps
also the pointer to the current line of code?

Cheers,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to