Font Conventions

This book uses the following typographical conventions:

Italic

广告:个人专属 VPN,独立 IP,无限流量,多机房切换,还可以屏蔽广告和恶意软件,每月最低仅 5 美元

Used for email addresses, URLs, filenames, pathnames, and emphasizing new terms when they are first introduced

Constant width

Used for the contents of files and the output from commands, and to designate modules, methods, statements, and commands

Constant width bold

Used in code sections to show commands or text that would be typed by the user, and, occasionally, to highlight portions of code

Constant width italic

Used for replaceables and some comments in code sections

<Constant width>

Indicates a syntactic unit that should be replaced with real code

Note

Indicates a tip, suggestion, or general note relating to the nearby text.



Warning

Indicates a warning or caution relating to the nearby text.



Note

Notes specific to this book: In this book’s examples, the % character at the start of a system command line stands for the system’s prompt, whatever that may be on your machine (e.g., C:\Python30> in a DOS window). Don’t type the % character (or the system prompt it sometimes stands for) yourself.

Similarly, in interpreter interaction listings, do not type the >>> and ... characters shown at the start of lines—these are prompts that Python displays. Type just the text after these prompts. To help you remember this, user inputs are shown in bold font in this book.

Also, you normally don’t need to type text that starts with a # in listings; as you’ll learn, these are comments, not executable code.