I have a Class names Game.
In the __init__
method I assigned each instance 3 attributes:
class Game:
def __init__(self):
self.__players = []
self.__num_of_players = 0
self.__lop = LOP()
Now in my main method i do the following:
for player in game.__players:
...
And I get the following error:
AttributeError: Game instance has no attribute '__players'