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

Basic Best Practices

In the previous chapter, we saw how to put together a Python package of code and data. In this chapter, we're going to look at some rather simple things we can do that will make our lives as Python programmers simpler overall. We'll switch gears and look at version control, which will help us to collaborate with other programmers and serve as an undo buffer for the whole lifetime of a project. We're going to look at Python's built-in virtual environment tool, venv, which allows us to keep our programs and dependencies separate from each other and the software installed on our overall system.

You'll learn how to structure our docstrings for maximum utility, how to add Rich Text formatting to them, and how to export them into hyperlinked HTML documentation for viewing in a web browser. You'll also see one more cool advantage we can get from docstrings by actually executing the examples we include in our documentation and making sure they agree with what the code actually does.

In this chapter, we'll cover the following topics:

  • PEP 8 and writing readable code
  • Using version control
  • Using venv to create a stable and isolated work area
  • Getting the most out of docstrings
主站蜘蛛池模板: 天祝| 大田县| 焦作市| 噶尔县| 望都县| 双城市| 浮山县| 那曲县| 呼玛县| 咸阳市| 平度市| 台中县| 乌拉特中旗| 宜宾市| 霍邱县| 临汾市| 铅山县| 五家渠市| 尚志市| 娱乐| 固原市| 阳城县| 许昌县| 望谟县| 周宁县| 朝阳市| 海林市| 赞皇县| 台江县| 北宁市| 鹿邑县| 玛沁县| 五台县| 富民县| 玉山县| 师宗县| 丰台区| 青神县| 柳江县| 陆河县| 利津县|