- Mastering Python
- Rick van Hattem
- 155字
- 2021-07-16 11:10:30
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: "It should be noted that the type()
function has another use as well."
A block of code is set as follows:
import abc import importlib class Plugins(abc.ABCMeta): plugins = dict() def __new__(metaclass, name, bases, namespace): cls = abc.ABCMeta.__new__( metaclass, name, bases, namespace)
Any command-line input or output is written as follows where the >>> indicate the Python console and the # indicates a regular Linux/Unix shell:
>>> class Spam(object): … eggs = 'my eggs' >>> Spam = type('Spam', (object,), dict(eggs='my eggs'))
推薦閱讀
- Puppet 4 Essentials(Second Edition)
- Python概率統計
- Python高效開發實戰:Django、Tornado、Flask、Twisted(第2版)
- BIM概論及Revit精講
- Julia高性能科學計算(第2版)
- 微信小程序開發與實戰(微課版)
- Visualforce Developer’s guide
- Learning Nessus for Penetration Testing
- JavaWeb從入門到精通(視頻實戰版)
- Python深度學習與項目實戰
- 編寫高質量代碼之Java(套裝共2冊)
- jQuery基礎教程(第4版)
- 高性能Java架構:核心原理與案例實戰
- NIO與Socket編程技術指南
- HTML5與CSS3權威指南(第2版·上冊)