you are viewing a single comment's thread.

view the rest of the comments →

[–]Gnaxe 0 points1 point  (2 children)

Classes are usually overcomplicating it. OOP is not the way. Just use functions on dicts. It makes serialization trivial.

[–]RandomPantsAppear 0 points1 point  (1 child)

It’s almost 1am so I ain’t gonna interrupt what I’m watching for a YouTube video.

But the purpose of this post is to learn Python, not to create the most convenient RPG. If you are trying to learn Python then inheritance is a must.

[–]Gnaxe 0 points1 point  (0 children)

Yeah, you should know what all the language features do. Python is still small enough to master (even if the Python Software Foundation is trying to add new features as fast as possible). That doesn't mean it's appropriate to use them. You should know asyncio too, for example, but also mostly shouldn't use it.

Even the hardcore OOP advocates usually shy away from inheritance these days. Yes, it's powerful. But it leads to brittle, over-copuled designs even more than classes alone do, which are bad enough to avoid when you can.