2 ms·
In Python you can force the use of a parameter’s name with * def my_sleep(*, seconds: int): pass my_sleep(seconds=3) This will force those who use y
by rolobio 5y ago
In Python you can force the use of a parameter’s name with *
def my_sleep(*, seconds: int):
pass
my_sleep(seconds=3)
This will force those who use your function to use the parameter name. A sort of documentation I suppose.
- Biganon 5y agoThat's in the article...?