I was looking for something in Djangos
source code when I came upon the definition of django.forms.fields.Field.__init__()
:
class Field:
def __init__(self, *, required=True, ...):
The method has more arguments, but I was surprised by the second argument, which is only the asterisk symbol. I had not seen this before. I could not find an explanation with a few quick google searches.
It is not a valid argument name, meaning I cannot use the passed value in print(*)
. It is also different from the *args
and **kwargs
arguments (I know how to use these 2).
Any explanations for this? Or any links where I can read about this usage?