Home/Support/Support Forum/What does "self" mean? i see it written in almost every function in readthedocs of xblibrary. Plz help
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

What does "self" mean? i see it written in almost every function in readthedocs of xblibrary. Plz help

0 votes
For example i am using pwm, so the example given in read the docs is:

def set_pwm_duty_cycle(self, io_line, cycle):

if not io_line.has_pwm_capability():
raise ValueError("%s has no PWM capability." % io_line)
if cycle < 0 or cycle > 100:
raise ValueError("Cycle must be between 0% and 100%.")

duty_cycle = int(round(cycle * 1023.00 / 100.00))

self.set_parameter(io_line.pwm_at_command, bytearray(utils.int_to_bytes(duty_cycle)))
asked Nov 24, 2019 in 3rd Party Python and API development in other Languages by adarsh New to the Community (0 points)
reshown Dec 6, 2019 by mvut

Please log in or register to answer this question.

...