[pythran] Re: multiple default arguments

  • From: Serge Guelton <serge.guelton@xxxxxxxxxxxxxxxxxxx>
  • To: pythran@xxxxxxxxxxxxx
  • Date: Sun, 8 Nov 2020 20:44:22 +0100

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)

Other related posts: