没有合适的资源?快使用搜索试试~ 我知道了~
首页Python Pocket Reference 5th 原版PDF by Lutz
Python Pocket Reference 5th 原版PDF by Lutz

Python is a general-purpose, multiparadigm, open source computer programming language, with support for object-oriented, functional, and procedural coding structures. It is commonly used both for standalone programs and for scripting applications in a wide variety of domains, and is generally considered to be one of the most widely used programming languages in the world.
资源详情
资源评论
资源推荐

Python Pocket Reference, Fifth Edition
by Mark Lutz
Copyright © 2014 Mark Lutz. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebasto‐
pol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional
use. Online editions are also available for most titles (http://my.safaribookson
line.com). For more information, contact our corporate/institutional sales de‐
partment: 800-998-9938 or corporate@oreilly.com.
Editor: Rachel Roumeliotis
Production Editor: Kristen Brown
Copyeditor: Richard Carey
Proofreader: Amanda Kersey
Indexer: Lucie Haskins
Cover Designer: Randy Comer
Interior Designer: David Futato
October 1998: First Edition
January 2002: Second Edition
February 2005: Third Edition
October 2009: Fourth Edition
February 2014: Fifth Edition
Re
vision History for the Fifth Edition:
2014-01-17: First release
See http://oreilly.com/catalog/errata.csp?isbn=9781449357016 for release de‐
tails.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are
registered trademarks of O’Reilly Media, Inc. Python Pocket Reference, the im‐
age of a rock python, and related trade dress are trademarks of O’Reilly Media,
Inc.
Many of the designations used by manufacturers and sellers to distinguish their
products are claimed as trademarks. Where those designations appear in this
book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations
have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the
publisher and authors assume no responsibility for errors or omissions, or for
damages resulting from the use of the information contained herein.
ISBN: 978-1-449-35701-6
[M]

Table of Contents
Introduction 1
Book Conventions 2
Python Command-Line Usage 3
Python Command Options 4
Command-Line Program Specification 5
Python 2.X Command Options 7
Python Environment Variables 7
Operational Variables 8
Python Command Option Variables 9
Python Windows Launcher Usage 10
Launcher File Directives 10
Launcher Command Lines 11
Launcher Environment Variables 11
Built-in Types and Operators 12
Operators and Precedence 12
Operator Usage Notes 14
Operations by Category 16
Sequence Operation Notes 20
Specific Built-in Types 21
Numbers 22
iii

Strings 24
Unicode Strings 42
Lists 46
Dictionaries 53
Tuples 57
Files 58
Sets 63
Other Types and Conversions 65
Statements and Syntax 67
Syntax Rules 67
Name Rules 69
Specific Statements 71
The Assignment Statement 72
The Expression Statement 76
The print Statement 77
The if Statement 80
The while Statement 80
The for Statement 80
The pass Statement 81
The break Statement 81
The continue Statement 81
The del Statement 81
The def Statement 82
The return Statement 86
The yield Statement 87
The global Statement 88
The nonlocal Statement 89
The import Statement 89
The from Statement 93
The class Statement 95
The try Statement 97
The raise Statement 99
iv | Table of Contents
剩余263页未读,继续阅读














安全验证
文档复制为VIP权益,开通VIP直接复制

评论1