Sunday 31 December 2017

kwargs reserved word in python. What does it mean?

I am using Python trying to figure out a key word and I
see the word, "kwargs", which I know is some kind of argument
in the called function but I can not find what it means or stands for anywhere.




For example, this entry in the
Python documents
says...



read_holding_registers(address,
count=1,
**kwargs)


Parameters:



address
– The starting address to read from
count – The number of registers to
read

unit – The slave unit this request is
targeting


It looks
like a reference to a pointer to pointer but that is all I
can
tell...



This does NOT even use
"**kwargs" in the parameters list It uses
what looks
to me like, "unit" instead of
"kwargs".



I can NOT
seem to find anywhere what kwargs
means.




Maybe it is "Key Word
arguments" ? What am I missing here ?



Any ideas
on help here ?
thank you !
boB

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...