I\'d like to write a python function which adds all its arguments, using + operator. Number of arguments are not specified:
+
def my_func(*args):
If you definitely won't be using sum, then something like:
sum
def func(*args, default=None): from operator import add try: return reduce(add, args) except TypeError as e: return default
or functools.reduce in Py3
functools.reduce