- 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'))
推薦閱讀
- Getting Started with Citrix XenApp? 7.6
- TypeScript入門與實戰
- Python自然語言處理實戰:核心技術與算法
- C語言程序設計案例教程(第2版)
- LabVIEW入門與實戰開發100例
- PHP+MySQL網站開發技術項目式教程(第2版)
- 程序員考試案例梳理、真題透解與強化訓練
- Learn Programming in Python with Cody Jackson
- Java EE 7 Development with NetBeans 8
- HTML5+CSS3+JavaScript Web開發案例教程(在線實訓版)
- Instant RubyMotion App Development
- TradeStation交易應用實踐:量化方法構建贏家策略(原書第2版)
- Java Web開發就該這樣學
- Essential C++(中文版)
- JavaScript腳本特效編程給力起飛