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

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.

主站蜘蛛池模板: 疏附县| 大同县| 浦北县| 灵川县| 台湾省| 江城| 莲花县| 宁波市| 驻马店市| 柯坪县| 栖霞市| 和硕县| 保定市| 招远市| 宁河县| 安岳县| 白沙| 黔江区| 松江区| 慈利县| 玉溪市| 吉安市| 松江区| 蒲城县| 望都县| 剑阁县| 资溪县| 玉溪市| 襄城县| 斗六市| 宁明县| 定结县| 扎赉特旗| 汕头市| 永寿县| 定安县| 花莲县| 吕梁市| 临海市| 淮滨县| 淅川县|