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

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.

主站蜘蛛池模板: 原阳县| 泸水县| 栾川县| 通江县| 广丰县| 柳河县| 格尔木市| 新昌县| 额敏县| 青阳县| 阿拉尔市| 若羌县| 宜春市| 固安县| 额尔古纳市| 德阳市| 东丽区| 新丰县| 元谋县| 蓬溪县| 宜春市| 榕江县| 缙云县| 湟源县| 台前县| 库车县| 苍溪县| 小金县| 通州市| 宁阳县| 高雄县| 通河县| 西华县| 宁武县| 洛阳市| 株洲县| 济源市| 巴南区| 平山县| 稷山县| 定日县|