Application.nargs should be a tuple in all cases (issue 3741)
Canonicalize nargs (to be a tuple) in Function class
Implement some suggestions on PR#2201
Modify Function classes (nargs: int -> tuple)
Fix tests
Revert "Modify Function classes (nargs: int -> tuple)"

This reverts commit 9528e8917ab5cf2c675403204fb9219102bc5cf2.
Drop nargs specifications from Lambda-derived classes
Implement nargs canonicalization in the FunctionClass metaclass
Test nargs canonicalization
Cleanup nargs handling
fix error messages wrt what defines plural

Conflicts:
	sympy/core/function.py
give FunctionClass-like functions tuple args

At the FunctionClass level we work with possible arguments and
at the applied function level we return the actual count of
the arguments that are being used.

what                 nargs -> new return value (if any)
==============       ==================================
f                    None -> no change, see (*)
sin                  1 -> (1,)
log                  (1, 2) -> no change
f(x)                 1
sin(x)               1
log(x)               (1, 2) -> change to actual arg count (in this case, 1)
Piecewise(((x,x<0))) None -> no change, see (**)
Lambda(x, x+1)       1 -> (1,) see (***)

(*) it can take any number of arguments so we don't want to
have a check like `1 in o.nargs` be False (suggesting an arg-count
mismatch); it's better to realize that an unapplied function can take any
number of arguments.

(**) Piecewise, though deriving from Function isn't really a function,
it is a collection of expressions, only one of which will ever be
active for a given set of unspecified arguments. So it's ok to leave
the nargs as None. Lambda, however, is much more like a FunctionClass
but it just has no name.

(***) This one could be left unchanged, but it is much more like
a FunctionClass than an applied function: it needs arguments
just like f, sin and log do.

Note: WildFunction, by default, has nargs = 1. If it is set to None
it will match a function with any number of arguments. If it is set
to a tuple, it will match a function having a number of arguments
that are in the tuple, e.g. (1, 2) will match a function with 1 or 2
arguments.
modify doctests and add tests for nargs
remove ineffective setting of nargs
set nargs to -1 for Application

The function log has nargs = (1, 2). It would be nice to remove
the nargs attribute from log(x) since the number of arguments is
exactly 1 -- len(log(x).args) == 1. But I haven't been successful
at that. So rather than leave nargs defined to either the unapplied
nargs value (a tuple) or redefining it as an integer equal to the
length of the functions args, it is being set to -1 to discourage
its use.
leave nargs alone after application
modify function.py docstring