Xah Lee wrote:
is there a way to write a expression of a function with more than 1
argument?

e.g., i want a expression that's equivalent to

def f(x,y)
  return x+y

Since assignment is a statement in Python, not an expression, and since "def f" is an assignment that binds a function object to the name "f", you can't do exactly what you've asked for.

On the other hand, this should be about equivalent, though
it's not merely an expression:

f = lambda x, y: x + y
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to