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

Best practices

There are any number of standards and best practices that surround development, at least once the code base(s) involved gets above a certain level of complexity. They are considered as such because they solve (or prevent) various difficulties that will likely arise if they aren't followed. A fair number of them also focus, if indirectly, on some aspect of future-proofing code, at least from the perspective of trying to make it easier for a new developer (or the same developer, maybe years later) to understand what the code does, how to find specific chunks of code, or, perhaps, to extend or refactor it.

Those guidelines fall, roughly, into two categories, no matter the programming language:

  • Standards for code: Guidelines and concepts that focus on the structure and organization of code, though not necessarily on how that code functions – more on keeping it easily understood and navigable

  • Process standards: Guidelines and concepts that center around making sure that code is well behaved and that changes to it can be made with the minimum amount of hassle and disruption

Python adds two more items into that mix that don't quite fit into either of those language-agnostic categories; they are the results of capabilities and functional requirements in the context of Python specifically:

  • Package organization: How best to structure code at a file-system level; where and when to generate new module files and package directories

  • When and how to use Python virtual environments: What purposes they serve, and how best to leverage them for a given collection of code

主站蜘蛛池模板: 碌曲县| 宁阳县| 明光市| 永胜县| 唐山市| 淮安市| 德庆县| 元阳县| 文安县| 兴国县| 烟台市| 茂名市| 中牟县| 黄山市| 兴化市| 库车县| 镇远县| 沁源县| 曲靖市| 汝州市| 外汇| 正安县| 双桥区| 阿巴嘎旗| 武义县| 伽师县| 安远县| 开远市| 柘荣县| 朔州市| 灵川县| 门源| 内乡县| 焉耆| 双江| 昌宁县| 玉屏| 浏阳市| 无为县| 三穗县| 加查县|