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

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.

主站蜘蛛池模板: 聂拉木县| 抚松县| 宝山区| 麻城市| 安图县| 兴文县| 潞城市| 原平市| 富民县| 临夏县| 宁陕县| 静乐县| 玉溪市| 全椒县| 尚义县| 平泉县| 五大连池市| 永福县| 庆元县| 桐庐县| 密云县| 德州市| 金门县| 娄底市| 凤阳县| 平顺县| 青冈县| 福泉市| 喀喇沁旗| 抚州市| 汝阳县| 博乐市| 长海县| 古蔺县| 沐川县| 武定县| 兴仁县| 天柱县| 望奎县| 巴彦淖尔市| 樟树市|