官术网_书友最值得收藏!

Conventions

This book uses a variety of text styles to 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 look up the class in the dictionary and store it in a variable named PropertyClass."

A block of code is set as follows:

    def add_property(self):
        property_type = get_valid_input(
                "What type of property? ",
                ("house", "apartment")).lower()
        payment_type = get_valid_input(
                "What payment type? ",
                ("purchase", "rental")).lower()

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

    def add_property(self):
 property_type = get_valid_input(
                "What type of property? ",
                ("house", "apartment")).lower()
 payment_type = get_valid_input(
                "What payment type? ",
                ("purchase", "rental")).lower()

Any command-line input or output is written as follows:

>>> c1 = Contact("John A", "johna@example.net")
>>> c2 = Contact("John B", "johnb@example.net")
>>> c3 = Contact("Jenna C", "jennac@example.net")
>>> [c.name for c in Contact.all_contacts.search('John')]
['John A', 'John B']

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "It will fail with a not enough arguments error similar to the one we received earlier when we forgot the self argument."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

主站蜘蛛池模板: 徐汇区| 禹州市| 专栏| 莱西市| 凤台县| 克东县| 宝清县| 乌鲁木齐县| 乌拉特中旗| 偏关县| 扎兰屯市| 河西区| 连城县| 新沂市| 衡阳市| 泊头市| 淮阳县| 彩票| 伊川县| 嘉义县| 诸城市| 永胜县| 和龙市| 东乡族自治县| 新邵县| 龙门县| 华蓥市| 曲水县| 玛沁县| 色达县| 阜新市| 宁波市| 辽中县| 翁牛特旗| 张家港市| 寿宁县| 桦南县| 松滋市| 鲜城| 环江| 周至县|