The rule is common sense, and mainly, the good programming practices.
To object orientation is a form of programming that enables developers to think about things like work in real life: objects. 2
With techniques such as composition, inheritance and polymorphism, one can achieve a better abstraction:
class Armamento:
dano = 1
...
class Punhal(Armamento):
def apunhalar()
...
class Rifle(Armamento)
def atirar()
...
class Agente:
nivel = 10
forca = 2
arma = Rifle
...
class Personagem(Agente):
nome = 'ficticio'
def aguardar_entrada()
...
class Inimigo(Agente):
def cacular_ataque()
...
The lack of this abstraction should result in greater effort/operational cost for understanding and maintenance of the code, affecting the software quality.
Even if I exaggerate, I say yes, it is a bad practice a class with more than 30 attributes, with many exceptions. 9
Look at object orientation, or necessary for its application, your way.
Excellent understanding of my question and objectivity in the reply. Congratulations and thank you!
– CodexZombie