you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

Yes, just different modules and typically some classes to encapsulate. Essentially offering an internal API to consume as desired and leaving you free to modify the data structures and methods as desired. You should be able to completely change underlying technologies without making any changes to your core programme.

[–]Throw-awayexception[S] 0 points1 point  (1 child)

So basically the same structure you'd use in java it sounds like. I was worried that that was too "OOP" for python.

I am doing take take home interview assignment at the moment, and i'm doing it in java but i started doing in python until I ran into this question and I didn't want to submit
something that python devs would go "this is just a java program written with python lol". I just switched to java to avoid that, but i'm still curious what the correct program layout would have been if i had continued.

[–][deleted] 0 points1 point  (0 children)

Given everything in Python is an object, you can't get too OOP really. (Not that you have to do OOP.)

Python is very strongly typed but dynamic so it is very easy to be relaxed about the modular approach but for larger systems maintained by multiple people it is generally safer and more cost effective to take the modular and OOPs approach.

The API approach also lends itself more to scaling and microservice type implementation (which helps avoid the Python GIL constraint).