Reading Great Code

https://d33wubrfki0l68.cloudfront.net/2ce1dd128f0ad5e10e272b859435541f1ea54ded/e9b8b/_images/34689452831_93d7fd0571_k_d.jpg
One of the secrets of becoming a great Python programmer is to read,understand, and comprehend excellent code.

Excellent code typically follows the guidelines outlined inCode Style, and does its best to express a clear and conciseintent to the reader.

Included below is a list of recommended Python projects forreading. Each one of these projects is a paragon of Python coding.

  • HowdoiHowdoi is a code search tool, written in Python.
  • FlaskFlask is a microframework for Python based on Werkzeug and Jinja2.It’s intended for getting started very quickly and was developed withbest intentions in mind.
  • DiamondDiamond is a Python daemon that collects metricsand publishes them to Graphite or other backends.It is capable of collecting CPU, memory, network, I/O, load, and disk metrics.Additionally, it features an API for implementing custom collectorsfor gathering metrics from almost any source.
  • WerkzeugWerkzeug started as a simple collection of various utilities for WSGIapplications and has become one of the most advanced WSGI utility modules.It includes a powerful debugger, full-featured request and response objects,HTTP utilities to handle entity tags, cache control headers, HTTP dates,cookie handling, file uploads, a powerful URL routing system, and a bunchof community-contributed addon modules.
  • RequestsRequests is an Apache2 Licensed HTTP library, written in Python,for human beings.
  • TablibTablib is a format-agnostic tabular dataset library, written in Python.

Todo

Include code examples of exemplary code from each of the projects listed. Explain why it is excellent code. Use complex examples.

Todo

Explain techniques to rapidly identify data structures and algorithms and determine what the code is doing.

原文: https://docs.python-guide.org/writing/reading/