官术网_书友最值得收藏!

Summary

In this chapter, we learned how to create a Python package as a directory on the filesystem and how to mark it with an __init__.py file, so that importing is efficient and we can add package metadata. We looked at adding code modules to a package. We saw how code modules within the same package interact.

We learned how to put together a Python code package that can be used in a program or distributed to other programmers. Soon, we'll see how to turn a package into a complete program as well. In the next chapter, we'll step back a little bit and talk about some best practices for working with Python code.

主站蜘蛛池模板: 岳阳市| 遵义县| 湟中县| 洞口县| 蓬安县| 丁青县| 福贡县| 大姚县| 武鸣县| 固始县| 汾阳市| 疏勒县| 乐业县| 界首市| 海晏县| 西平县| 商水县| 绥江县| 寿宁县| 石棉县| 万年县| 文化| 汨罗市| 香港 | 峨边| 双桥区| 东乡| 南通市| 宜宾市| 黄龙县| 三河市| 静安区| 云梦县| 景洪市| 宜良县| 丘北县| 永泰县| 汝阳县| 平江县| 乐陵市| 临海市|