Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We will use two libraries that are part of the Python distribution for working with XML and JSON: xml.etree.ElementTree
and json
."
A block of code is set as follows:
@property def parsed_data(self): return self.data
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
@property
def parsed_data(self):
return self.data
Any command-line input or output is written as follows:
>>> python3 factory_method.py
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.
Book references follow the format [Author, page]. For example, the reference [GOF95, page 10] refers to the 10th page of the GOF (Design Patterns: Elements of Reusable Object-Oriented Software) book. At the end of the book, there is a section devoted to all book references.
Web references follow the format [j.mp/shortened
]. These are shortened URL addresses that you can type or copy/paste into your web browser and be redirected to the real (usually longer and sometimes uglier) web reference. For example, typing j.mp/idiompyt in you web browser's address bar should redirect you to http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html.