>>>>> foo.func_code.co_nlocals >> 5 >>>>> foo.func_code.co_varnames >> ('a', 'b', 'c', 'args', 'kwds') Kragen> co_nlocals isn't right; Mark asked for co_argcount: My apologies. -- Skip Montanaro (skip at pobox.com) http://www.mojam.com/ http://www.musi-cal.com/