Python彩蛋源码分析(二)

发布于:2023-07-04 ⋅ 阅读:(164) ⋅ 点赞:(0)
简介👾

非常高兴大家能够订阅这个专栏,在这里我将会给大家分享一些Python相关源码的剖析
在接下来的这段日子里,我会一同带各位pythonista探索Python的奥秘


hello world 👾

hello world, hello python, hello golang等等也许是你的第一行代码
__hello__是一个冻结模块,作为冻结模块支持的一个测试样例
source code link

$ python -c "import __hello__"
Hello world!
$ ipython                                          
Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:
Type 'copyright', 'credits' or 'license' for more i
IPython 7.27.0 -- An enhanced Interactive Python. T
                                                   
In [1]: import __hello__                           
Hello world!                                       
In [2]: import __hello__   # 一个模块只会被

网站公告

今日签到

点亮在社区的每一天
去签到