1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| >>> rgb(1,2,3)
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Prog\python\test0.py", line 18, in wrapper
raise TypeError("Expected arguments: " + str(types))
TypeError: Expected arguments: (<type 'str'>, <type 'str'>, <type 'str'>)
>>> rgb("abc")
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Prog\python\test0.py", line 20, in wrapper
raise TypeError("Not enough arguments. Expected " + str(types))
TypeError: Not enough arguments. Expected (<type 'str'>, <type 'str'>, <type 'str'>)
>>> rgb("r","g","b")
r g b
>>> rgb(["r","g","b"])
r g b
>>> rgb(["r","g"],"b")
r g b
>>> rgb(["r","g"],[[["b"]]])
r g b
>>> rgb("r","g","b","a")
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Prog\python\test0.py", line 27, in wrapper
raise TypeError("Too much arguments. Expected " + str(types))
TypeError: Too much arguments. Expected (<type 'str'>, <type 'str'>, <type 'str'>) |