Commits
Click on a commit to change the comparison rangeSupport passing package name as pythran signature
This patch introduces a new argument type of the form `<name> pkg`, for instance `numpy pkg`.
It's a special function export type which, if used, must be used
consistently across all overloads for that exported function.
It is resolved before any compilation step and is syntactically
equivalent to statically resolving the given argument to the given
package. For instance,
#pythran export foo(float, numpy pkg)
def foo(x, np):
return np.cos(x)
is equivalent to the following:
#pythran export foo(float, numpy pkg)
def foo(x, _):
import numpy as np
return np.cos(x)
It also propagates through function arguments, baring some limitations.
The exported foo function still has two parameters and the second
parameter is going to check that the passed argument is a module named
'numpy'.
Fix #236718 days ago
by serge-sans-paille