| Start |
|---|
| name == 'main' The special variable Let module_1.py be just one line long: And let's see what happens, depending on module2.py Situation 1module2.py Running module1.py will print Situation 2module2.py Running module1.py will print nothing |
| function_class_or_module.name The special attribute The This can be used, among others, for debugging: |
| Use in logging When configuring the built-in This means that the fully-qualified name of the module will appear in the logs, making it easier to see where messages have come from. RemarksThe Python special variable The related special attribute |
Read Article
https://develop.horje.com/learn/1434/reference