Object() takes no parameters?


#1

Hi, I have no clue why the editor gives me this error. Please help. Thanks.

class A:
    def __int__(self, on):
        self.__on = not on

    def get_on(self):
        return self.__on


def main():
    a = A(False)
    print(a.get_on())


main()  # Call the main function

#2
class A:
    def __init__(self, on):

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.