third_party.pylibs.pylint.src/test/input/func_arguments.py
James Lingard d70e6d4995 Add a checker verifying that the arguments passed to a
function call match the function's formal parameters
2009-11-25 09:52:56 +01:00

36 lines
836 B
Python

"""Test function argument checker"""
__revision__ = ''
def function_1_arg(first_argument):
"""one argument function"""
return first_argument
def function_3_args(first_argument, second_argument, third_argument):
"""three arguments function"""
return first_argument, second_argument, third_argument
def function_default_arg(one=1, two=2):
"""fonction with default value"""
return two, one
function_1_arg(420)
function_1_arg()
function_1_arg(1337, 347)
function_3_args(420, 789)
function_3_args()
function_3_args(1337, 347, 456)
function_3_args('bab', 'bebe', None, 5.6)
function_default_arg(1, two=5)
function_default_arg(two=5)
function_default_arg(two=5, two=7)
function_default_arg(two=5, one=7, one='bob')
function_1_arg(bob=4)
function_default_arg(1, 4, coin="hello")
function_default_arg(1, one=5)