Python OOP child classes


#1

Hi there.

what is wrong here?
I am trying to make different items, such as a candle for the players inventory
i want to create a child class for item
here is the code

gameExit = False
gameOver = False

while not gameExit and gameOver:

 class item():
    def __init__(self, name, description):

        self.name = name
        self.description = description


 class Candle(item):
     def __init__(self):
         



class player():
    def __init__(self):
        self.inventory = []

#2

Is anybody here to respond?


#3

that line translates to

while True and False:
#True and False is False

The content of your while loop which is everything else in your code is never executed.
Secondly why are you creating your classes inside a while loop? What that implies as long as your loop runs the classes will be created over and over again. Re-evaluate the Structure of code and come back if you have problems