determining the number of output arguments

Alex Martelli aleaxit at yahoo.com
Mon Nov 15 16:30:44 EST 2004


Fernando Perez <fperez528 at yahoo.com> wrote:

> suspect that by playing very nasty tricks with sys._getframe(), the dis
> and the inspect modules, you probably _could_ get to this information, at
> least if the caller is NOT a C extension module.  But I'm not even 100%
> sure this works, and it would most certainly the kind of black magic I'm
> sure you are not asking about.  But given the level of expertise here, I
> better cover my ass ;-)

Yep, that's the cookbook recipe Jp was mentioning -- Sami Hangaslammi's
recipe 284742, to be precise.  Yep, it _is_ going into the printed 2nd
edition (which I'm supposed to be working on right now -- deadline
closing in, help, help!-).


Alex



More information about the Python-list mailing list