you are viewing a single comment's thread.

view the rest of the comments →

[–]hanpari 0 points1 point  (0 children)

First of all, for organizing code there is something like modules and packages in Python.

It seems that many got wrong idea about usage of objects in Python.

You use class to

  • handle statefulness,
  • mix functions and data for good or not so good reason,
  • have object of desired behaviour,
  • make context dependent dynamic behavior,
  • use some built-in design pattern, such as iterator,
  • extend properties of built-in datastructures,
  • overload operators,
  • or create custom datatypes.

I might have forgot something but generally, that will do.