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

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.

主站蜘蛛池模板: 昌都县| 鸡西市| 沐川县| 横山县| 甘肃省| 渑池县| 兴国县| 墨竹工卡县| 佛冈县| 澄迈县| 弥渡县| 娄底市| 巴林左旗| 安宁市| 淮南市| 平塘县| 新郑市| 孟连| 高邮市| 唐河县| 沂源县| 陇西县| 满洲里市| 天柱县| 汉源县| 成都市| 伊宁市| 黄浦区| 墨江| 洱源县| 弥渡县| 大姚县| 屯留县| 景谷| 固安县| 汽车| 阿拉尔市| 鸡西市| 德保县| 延庆县| 曲沃县|