Can you isolate python projects logically into separate files / classes, e.g. in C # / Java?

I am looking for a python project to develop, and all the python I wrote is minor scripting without regard to classes or structure. I haven't seen much about this, is that how big python projects are done?

Also, are there such things as “namespaces” and “projects” in this area? Like object oriented principles like inheriting from other classes?

+3
source share
4 answers

Yes you can, and you must! :)

Here is a good introduction to Python Modules (including packages).


: , , (, Java- ++). , , , , ( -, / - ).

+2

(, defs ..) python ( ), import. (, Python) .

+1

Yes.

You can put the python classes in separate files, use namespaces to define the scope , then put it in Modules , which can be downloaded from other scripts.

0
source

Source: https://habr.com/ru/post/1729320/


All Articles