Like many programming languages, Python treats function inputs and outputs asymmetrically. A function can have many arguments, but only one return value. Multiple return values are represented implicitly by returning a tuple. The system currently detects tuple return values and interprets them appropriately.
Unfortunately, not all Python functions respect the convention of returning tuples. For example, numpy.meshgrid returns a list of arrays, but in an expression like
xv, yv = np.meshgrid(x, y)
it is abundantly clear that we have a function call with two arguments and two (logical) return values. The system should use the syntax of multiple return values to identify them.
Like many programming languages, Python treats function inputs and outputs asymmetrically. A function can have many arguments, but only one return value. Multiple return values are represented implicitly by returning a tuple. The system currently detects tuple return values and interprets them appropriately.
Unfortunately, not all Python functions respect the convention of returning tuples. For example,
numpy.meshgrid
returns a list of arrays, but in an expression likeit is abundantly clear that we have a function call with two arguments and two (logical) return values. The system should use the syntax of multiple return values to identify them.