On 02/19/2014 07:33 AM, Oscar Benjamin wrote:
At the least I don't understand why it needs both the argument names
and the number of arguments as independent quantities. Surely
len(names) would be the number of arguments... Or am I missing
something?
In the standard library, the attributes are
func_code.co_varnames
and
func_code.co_argcount
Note that varnames will include all the locals, not just the formal
parameters. So the count tells you how many of them are parameters.
--
DaveA
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor