Python OOP broken?
|
06-23-2021, 08:51 PM
Post: #1
|
|||
|
|||
Python OOP broken?
Whenever I try to call a class method, the interpreter sometimes doesn't recognize that the "self" parameter is implied. most of my tests worked fine, but one certain case gave me an error:
Code: Traceback (most recent call last): (In case you're wondering, I am trying to recreate the popular board game Risk.) Here is my code so far: main.py: Code: import player game.py: Code: import player player.py: Code:
Is it a problem with my code, the interpreter, or both? |
|||
06-23-2021, 09:20 PM
(This post was last modified: 06-23-2021 09:23 PM by Albert Chan.)
Post: #2
|
|||
|
|||
RE: Python OOP broken? | |||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)