Can I override a class function without creating a new class in Python?
问题 I'm making a game in pygame and I have made an 'abstract' class that's sole job is to store the sprites for a given level (with the intent of having these level objects in a list to facilitate the player being moved from one level to another) Alright, so to the question. If I can do the equivalent of this in Python(code curtesy of Java): Object object = new Object (){ public void overriddenFunction(){ //new functionality }; }; Than when I build the levels in the game I would simply have to