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

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.

主站蜘蛛池模板: 辰溪县| 平原县| 怀化市| 常州市| 许昌市| 浮山县| 韩城市| 丰都县| 锦州市| 菏泽市| 通渭县| 彰化市| 凤山市| 新巴尔虎左旗| 大城县| 甘孜县| 昭觉县| 峨眉山市| 左权县| 裕民县| 花莲市| 宁远县| 永平县| 宁河县| 汪清县| 金秀| 广安市| 宿州市| 深水埗区| 平舆县| 西昌市| 沙田区| 北碚区| 治县。| 海口市| 长岭县| 邻水| 乐东| 历史| 威宁| 芦溪县|