I have the following function, which tests some default arguments:
def test_args(series_id:str, sort:int=1, limit:int=None, fill:bool=True) -> List[List]:
output = [ ['series_id', series_id, repr(type(series_id))], ['sort', sort, repr(type(sort))],
['limit', limit, repr(type(limit))],
['fill', fill, repr(type(fill))] ]
return output
It is called from Excel like this: =test_args("DBAA")
It returns, as follows. The errors are in red
series_id |
DBAA |
<class 'str'> |
sort |
0.00 |
<class 'int'> |
limit |
#N/A |
<class 'NoneType'> |
fill |
FALSE |
<class 'bool'> |
As the sort and fill arguments were missing, they should default to 1 and True respectively. Somehow, this isn't happening. It works when called from within Python. So I think this is probably a bug.
Thanks!
Matt