Page 1 of 1

__init__confusion

Posted: Thu Aug 11, 2022 7:58 am
by KJM
Since https://docs.micropython.org/en/latest/ ... tolib.html has no usage example I went looking for some. They all look something like

Code: Select all

class AES:
    def __init__(self, key, mode, IV):
There is no mention of 'def' or 'self' on the micropython.org page so I'm wondering if there is a usage example closer to the format given there?

Re: __init__confusion

Posted: Fri Aug 12, 2022 8:57 am
by pythoncoder
These are really basic questions on the Python language. I suggest you do an online course in Python on your PC to learn basic syntax before venturing into MicroPython on microcontrollers.