当前位置:网站首页>二十六.以主程序形式运行main
二十六.以主程序形式运行main
2022-04-22 02:56:00 【随便起个名称】
一.以主程序形式运行
- 在每一个模块的定义中都包括一个记录模块名称的变量_name_,程序可以检查该变量,以确定他们在哪个模块中执行。如果一个模块不是被导入到其他程序中执行,那么它可能在解释器的顶级模块中执行。顶级模块的_name_变量的值为_main_
- 只有单独运行这个模块时才会运行,被引用时不会运行此模块
-
if _name_ = '_main_': pass
版权声明
本文为[随便起个名称]所创,转载请带上原文链接,感谢
https://blog.csdn.net/weixin_55298700/article/details/124316639
边栏推荐
- Mongodb grouping query
- Performance test and comparison of oceanbase and MariaDB using dbt-3
- Playing with ABP framework -- translating mastering ABP framework
- Can you really use ` timescale?
- The traffic lights made by enumeration have an interface
- Extraction method of code reconstruction
- Evolution and construction of data warehouse architecture
- C pointer and array depth summary
- 网络和多媒体知识(3)
- JS表格排序
猜你喜欢

Detailed explanation of basic properties of binary sort tree

824. 山羊拉丁文(字符串分割 + 字符串替代)

72. Edit distance

Interpretation of Flink's new features of fine-grained resource management

Pytorch image classification: the official demo of pytorch implements a classifier (lenet)

Can you really use ` timescale?

After four years of outsourcing, it was abandoned

Why does MySQL index use B + tree instead of jump table?

Pv-tsm principle and MATLAB simulation

Playing with ABP framework -- translating mastering ABP framework
随机推荐
Mongodb grouping query
DOS 命令行基本命令及实践
Troubleshooting kubernetes - 10s delay
Detailed explanation of basic properties of binary sort tree
[laravel series 4.7] connect redis and cache applications
Pytorch image classification: the official demo of pytorch implements a classifier (lenet)
Game + NFT, another feasible scene from virtual to real
Creation of circular linked list and controllable output
(进阶)C函数调用
Will you "sell" SQL?
Introduction of explanatory variables in code refactoring
Stackoverflow:IActionContextAccessor Is Null
二叉排序树基本性质详解
How long can we rely on play to earn economic profits?
Word input formula shortcut key
kerberos認證協議
824. 山羊拉丁文(字符串分割 + 字符串替代)
Why is the country established
JS表格排序
IIS prompt: the solution of "this website requires you to log in".