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

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.

主站蜘蛛池模板: 墨竹工卡县| 太湖县| 海门市| 叶城县| 赣榆县| 嘉兴市| 诏安县| 广东省| 襄城县| 西乡县| 平武县| 兴宁市| 光山县| 正蓝旗| 阿拉善右旗| 凌海市| 东丰县| 永福县| 蒙阴县| 阳信县| 新宾| 鹤峰县| 凌源市| 前郭尔| 贡山| 安溪县| 遂平县| 仁寿县| 诏安县| 资阳市| 隆化县| 栾川县| 陆良县| 太原市| 嵊泗县| 灵宝市| 武夷山市| 永德县| 晴隆县| 尼玛县| 谢通门县|