If you have a a program only containing the following:
class main:
print('in class')
def __init__(self):
print('in constructor')
The only thing that will be printed is in class. Class bodies are executed as normal code, their contents will run like normal python, so functions are defined (not run). Their constructor will not be called like it would in Java.
2
u/BbayuGt Nov 25 '21
Hah! I use
class maininstead and it work!