Why does Pygame use init() to initialize all imported modules instead of __init__()?
What's the difference between init() and __init__()?
What's the difference between init() and __init__()?
pygame why init() & not __init__()?
|
Why does Pygame use init() to initialize all imported modules instead of __init__()?
What's the difference between init() and __init__()?
Apr-17-2020, 04:47 AM
init() is regular function, just as any other.__init__() is a special function, part of a set of functions (so called dunders, from double-undercore) that are used to customize your own classes. In the case __init__() is called at class instantiation.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link Create MCV example Debug small programs |
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
pygame.mixer.init() devicename issue | wanhr | 2 | 4,805 |
Sep-15-2019, 09:08 AM Last Post: wanhr |
|
pygame.init help | raichu4vuhs | 2 | 5,926 |
May-18-2017, 08:33 PM Last Post: kennybassett |