Optional string argument
Is there a simple way to create a function that takes an optional String argument with no default value (assigned to None) ? I tried the following:
this works for a
I guess one way to make it work for now is to use a default value as follows:
But this does not allow to distinguish between a bad input and an empty imput
this works for a
String but calling the function with a StringLiteral does not: my_func("my_string") gives the following error invalid call to 'my_func': argument #0 cannot be converted from 'StringLiteral' to 'Optional[String]'I guess one way to make it work for now is to use a default value as follows:
But this does not allow to distinguish between a bad input and an empty imput
