----- Mail original -----
De: "serge guelton" <serge.guelton@xxxxxxxxxxxxxxxxxxx>
À: "pythran" <pythran@xxxxxxxxxxxxx>
Envoyé: Dimanche 8 Novembre 2020 20:44:22
Objet: [pythran] Re: multiple default arguments
On Sun, Nov 08, 2020 at 02:32:27PM +0100, PIERRE AUGIER wrote:
One could then also enable the long form:
#pythran export test(float64, int, (int, int))
#pythran export test(float64, empty, (int, int))
#pythran export test(float64, int, empty)
Not sure if empty is the best keyword here, but can't think of a better
one
what about... default? I like the syntax otherwise ;-)
If we follow a bit https://docs.python.org/3/library/typing.html ;(and
Transonic)
with an Optional keyword, it could be written in one line:
Optional is for optional type. here we want a way to epress that we use the
default value (and thus its inferred type)