Eli Zaretskii <
address@hidden> schrieb am Sa., 19. März 2016 um 17:28 Uhr:
> From: Philipp Stephani <address@hidden>
> Date: Sat, 19 Mar 2016 16:14:04 +0000
> Cc: address@hidden
>
> Knowing the arity in cases like this requires either evaluating the function, or complex parsing of its definition.
What do you mean by "complex parsing"? Did you look at how the Lisp
interpreter does that?
Yes, but parsing the arglist. But the arglist of g is (&rest args).
> It is very reasonable to assume that (func-arity 'g) would return (0 . many), because that is g's arity as far as
> the Lisp interpreter is concerned.
No, that's not g's arity:
(g 10 202 30) => error -> "Wrong number of arguments"
This cannot be detected without evaluating the function.