Good day, everyone.
Trying to get more experience with OOP in Python. It seemed very familiar to most languages, but after trying to get more practice with it now I'm not so sure anymore.
Trying to get more experience with OOP in Python. It seemed very familiar to most languages, but after trying to get more practice with it now I'm not so sure anymore.
Code
import urllib2
import sys
class Account:
entry_commands = ["register", "login", "exit"]
account_commands = ["view_details", "edit_details", "logout"]
admin_commands = ["delete_user", "view_user_details"]
misc_commands = ["promote", "demote", "clear_user_details", "clear_everyone"]
#def generate_id(self):
def register_user(self, name, password, date_of_birth, sex):
print("Lmao")
def __init__(self):
print("Welcome to the login")
for com in self.member.commands:
print("[%s] %s" %(self.member.commands.index(com), com
JuiceWater = Account()Code
JuiceWater = Account()
^
SyntaxError: invalid syntaxCode
E0001:invalid syntax (<string>, line 23)I get an error at when trying to initialize JuiceWater. It says invalid syntax, but this is the way I've been creating objects for days. Does anyone know why I'm not able to create Account objects, or am I just a dumbass for not seeing the obvious?
Any explanations would be much appreciated. 🤝
Any explanations would be much appreciated. 🤝




![[Image: npafFhp.gif]](https://i.imgur.com/npafFhp.gif)