On Fri, Nov 6, 2020 at 9:24 AM Serge Guelton <
serge.guelton@xxxxxxxxxxxxxxxxxxx> wrote:
On Fri, Nov 06, 2020 at 09:03:34AM +0100, Jochen S wrote:I think it would be good to have a way of allowing only a subset of keyword
Hilines
if I understand #1243 correctly I cannot export a function with multiple
default arguments, but only use the second or third. Something along the
of:and
#pythran export test(float64, int (int, int))
#pythran export test(float64, (int, int))
#pythran export test(float64, int)
#pythran export test(float64)
def test(x, i=0, t=(1,2)):
print(x)
print(i)
print(t)
At least that doesn't seem to work for me. and just specifying the first
last line I would always have to either pass i and t or none of themcorrect?
wrapper?
Is there are way of working around this, except for writing a python
Hi Jochen,
Your understanding is correct.
#pythran export test(float64, int, (int, int))
#pythran export test(float64, int)
#pythran export test(float64)
these three are legits, but not that one
#pythran export test(float64, (int, int))
without more info, there's no way for pythran to compute whether this is
i = (int, int) and t = (1,2)
or
i = 0 and t = (int, int)
we would need a new syntax for that. Any proposition?