Book Image

Expert Python Programming

By : Tarek Ziadé
Book Image

Expert Python Programming

By: Tarek Ziadé

Overview of this book

<p>Python is a dynamic programming language, used in a wide range of domains by programmers who find it simple, yet powerful. From the earliest version 15 years ago to the current one, it has constantly evolved with productivity and code readability in mind.<br /><br />Even if you find writing Python code easy, writing code that is efficient and easy to maintain and reuse is not so straightforward. This book will show you how to do just that:&nbsp; it will show you how Python development should be done. Python expert Tarek Ziadé takes you on a practical tour of Python application development, beginning with setting up the best development environment, and along the way looking at agile methodologies in Python, and applying proven object-oriented principles to your design.</p>
Table of Contents (21 chapters)
Credits
Foreword
About the Author
About the Reviewers
Preface
Index

Summary


This chapter explained in detail how to:

  • Use a few rules for efficient writing

  • Use reStructuredText, the Pythonistas LaTeX

  • Build a document portfolio and landscape

  • Use Sphinx to generate nice web documentation

The hardest thing to do when documenting a project is to keep it accurate and up to date. Making the documentation part of the code repository makes it a lot easier. From there, every time a developer changes a module, he or she should change the corresponding documentation as well.

This can be quite difficult in big projects, and adding a list of related documents in the header of the modules can help in that case.

A complementary approach to make sure the documentation is always accurate is to combine the documentation with tests through doctests.

This is covered in the next chapter, which presents Test-Driven Development principles, and then Document-Driven Development.