By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,587 Members | 1,711 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,587 IT Pros & Developers. It's quick & easy.

Re: Getting function and args from generator objects

P: n/a
Rui Jorge Rei wrote:
I have been searching for a way to fetch the originating function object
from a generator.
Futile, I believe.

I would also like to get all the arguments and keyword
arguments that were used when calling the function that created the
generator.
The arguments to a generator function are the arguments to the generator
's next method. The code is (in 3.0, at least) .gi_code and you can
extract whatever you can from that.

tjr

Nov 5 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.