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

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.

主站蜘蛛池模板: 积石山| 和龙市| 庆元县| 长丰县| 阳春市| 巍山| 北京市| 普陀区| 潞西市| 鄂托克旗| 九寨沟县| 芜湖市| 尤溪县| 小金县| 台湾省| 镇沅| 贵南县| 营口市| 苍南县| 上栗县| 宜丰县| 梨树县| 博湖县| 麻江县| 马尔康县| 武鸣县| 微山县| 神农架林区| 柞水县| 大连市| 新河县| 东安县| 大田县| 施甸县| 长泰县| 晋城| 云安县| 吉林省| 丰台区| 十堰市| 长武县|