Book Image

Daniel Arbuckle's Mastering Python

By : Daniel Arbuckle
Book Image

Daniel Arbuckle's Mastering Python

By: Daniel Arbuckle

Overview of this book

Daniel Arbuckle's Mastering Python covers the basics of operating in a Python development environment, before moving on to more advanced topics. Daniel presents you with real-world solutions to Python 3.6 and advanced-level concepts, such as reactive programming, microservices, ctypes, and Cython tools. You don't need to be familiar with the Python language to use this book, as Daniel starts with a Python primer. Throughout, Daniel highlights the major aspects of managing your Python development environment, shows you how to handle parallel computation, and helps you to master asynchronous I/O with Python 3.6 to improve performance. Finally, Daniel will teach you the secrets of metaprogramming and unit testing in Python, helping you acquire the perfect skillset to be a Python expert. Daniel will get you up to speed on everything from basic programming practices to high-end tools and techniques, things that will help set you apart as a successful Python programmer.
Table of Contents (13 chapters)

Getting the most out of docstrings

In this section, we will take a look at how to format docstrings for maximum readability and how to transform them into structured and formatted documentation. We're also going to look at how to make examples in the documentation testable so that the documentation is never out of date.

PEP 257 and docutils

PEP 257 documents the expectations of Python programmers and tools with respect to docstrings. The basic rules are quite simple. These are as follows:

The documentation is available at https://www.python.org/dev/peps/pep-0257/.
  • Use triple quotes to delimit the docstring. Triple quotes are how Python expresses the idea of a multiline text string.
  • The closing triple quotes should be...