I like to use the structures built into the language to organize my code. But there is one situation where I cannot remain consistent, simply because I do not see the ultimate best way to do this. This applies to support classes, that is, classes that are used exclusively within another class: I make them inner classes or separate classes.
Inner classes:
class Complicated:
class Utility1:
pass
class Utility2:
pass
pass
Separate classes:
class Complicated:
pass
class Utility1:
pass
class Utility2:
pass
Inner classes have the advantage of being limited within a single class that uses them. But the problem is that I get less space for writing code due to indentation.
, . , , .
, - python , ? , " ", , - , .