- 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'))
推薦閱讀
- Mastering PHP Design Patterns
- Mastering Yii
- Eclipse Plug-in Development:Beginner's Guide(Second Edition)
- Bootstrap 4:Responsive Web Design
- Instant RubyMotion App Development
- ASP.NET開發與應用教程
- 新一代SDN:VMware NSX 網絡原理與實踐
- 零基礎學C語言程序設計
- Arduino計算機視覺編程
- Xcode 6 Essentials
- Distributed Computing in Java 9
- Scala Functional Programming Patterns
- ASP.NET Core 2 High Performance(Second Edition)
- Python深度學習與項目實戰
- Unreal Engine Game Development Cookbook