چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

The Quick Python Book, Second Edition

Vernon L. Ceder [Ceder, Naomi R.]

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

سال انتشار
۲۰۱۰
فرمت
PDF
زبان
انگلیسی
حجم فایل
۳٫۰ مگابایت

دربارهٔ کتاب

Vernon Cedar, an experienced teacher of Python at the Canterbury School in Fort Wayne, Indiana and a vociferous proponent of the Python Language has done a superb job of updating an excellent text for the Python 3.0 Language and Programming Environment. Many texts slowly handhold a beginner to establish proficiency in their first programming language, others provide an exhaustive (and EXHAUSTING) reference for all the features of a language definition. This excellent and efficient text provides a rapid path to Python 3.0 proficiency for the programmer who has had exposure to at least one other modern programming language. It gives a rapid overview of the basic language features and programming environment to access its integration with the operating system, graphics libraries, regular expressions and other needed tools, all of this while respecting the needs talents and time limitations of the experienced programmer. It provides the most efficient path to the current version of Python for a Professional Programmer or Experienced Amateur while avoiding unnecessary details and laborious tutorials directed at the neophyte. I would recommend this book highly to anyone who like myself has had exposure to several programming languages and who wishes to rapidly come up to speed with this batteries-included latest programming environment. --Ira Laefsky MSE/MBA IT Consultant Formerly Senior Consultant with Arthur D. Little and DIGITAL Equipment Corporation Quick Python......Page 1 brief contents......Page 6 contents......Page 8 preface......Page 18 acknowledgments......Page 19 How to use this book......Page 21 Roadmap......Page 22 Code conventions......Page 23 About the author......Page 24 About the cover illustration......Page 25 Part 1 Starting out......Page 26 1.1 Why should I use Python?......Page 28 1.2.2 Python is expressive......Page 29 1.2.3 Python is readable......Page 30 1.2.6 Python is free......Page 31 1.3.1 Python is not the fastest language......Page 32 1.4 Why learn Python 3?......Page 33 1.5 Summary......Page 34 2.1 Installing Python......Page 35 2.2.1 The basic interactive mode......Page 37 2.2.2 The IDLE integrated development environment......Page 38 2.3 Using IDLE’s Python Shell window......Page 39 2.5 Using the interactive prompt to explore Python......Page 40 2.6 Summary......Page 42 3 The Quick Python overview......Page 43 3.2.1 Numbers......Page 44 3.2.2 Lists......Page 46 3.2.3 Tuples......Page 47 3.2.4 Strings......Page 48 3.2.6 Sets......Page 49 3.3.1 Boolean values and expressions......Page 50 3.3.3 The while loop......Page 51 3.3.5 Function definition......Page 52 3.3.6 Exceptions......Page 53 3.4 Module creation......Page 54 3.5 Object-oriented programming......Page 55 3.6 Summary......Page 56 Part 2 The essentials......Page 58 4.1 Indentation and block structuring......Page 60 4.3 Variables and assignments......Page 62 4.4 Expressions......Page 63 4.5 Strings......Page 64 4.6 Numbers......Page 65 4.6.4 Complex numbers......Page 66 4.6.5 Advanced complex-number functions......Page 67 4.10 Basic Python style......Page 68 4.11 Summary......Page 69 5 Lists, tuples, and sets......Page 70 5.2 List indices......Page 71 5.3 Modifying lists......Page 73 5.4 Sorting lists......Page 75 5.4.1 Custom sorting......Page 76 5.5.1 List membership with the in operator......Page 77 5.5.5 List search with index......Page 78 5.5.7 Summary of list operations......Page 79 5.6 Nested lists and deep copies......Page 80 5.7.1 Tuple basics......Page 82 5.7.3 Packing and unpacking tuples......Page 83 5.8.1 Set operations......Page 85 5.8.2 Frozensets......Page 86 5.9 Summary......Page 87 6.1 Strings as sequences of characters......Page 88 6.3 Special characters and escape sequences......Page 89 6.3.2 Numeric (octal and hexadecimal) and Unicode escape sequences......Page 90 6.3.3 Printing vs. evaluating strings with special characters......Page 91 6.4.1 The split and join string methods......Page 92 6.4.2 Converting strings to numbers......Page 93 6.4.3 Getting rid of extra whitespace......Page 94 6.4.4 String searching......Page 95 6.4.5 Modifying strings......Page 96 6.4.7 Useful methods and constants......Page 98 6.5 Converting from objects to strings......Page 99 6.6.2 The format method and named parameters......Page 101 6.7 Formatting strings with %......Page 102 6.7.2 Named parameters and formatting sequences......Page 103 6.9 Summary......Page 105 7 Dictionaries......Page 106 7.1 What is a dictionary?......Page 107 7.2 Other dictionary operations......Page 108 7.4 What can be used as a key?......Page 111 7.6 Dictionaries as caches......Page 113 7.8 Summary......Page 114 8.1 The while loop......Page 115 8.2 The if-elif-else statement......Page 116 8.3 The for loop......Page 117 8.3.1 The range function......Page 118 8.3.4 The enumerate function......Page 119 8.4 List and dictionary comprehensions......Page 120 8.5 Statements, blocks, and indentation......Page 121 8.6.1 Most Python objects can be used as Booleans......Page 124 8.6.2 Comparison and Boolean operators......Page 125 8.7 Writing a simple program to analyze a text file......Page 126 8.8 Summary......Page 127 9.1 Basic function definitions......Page 128 9.2.1 Positional parameters......Page 130 9.2.2 Passing arguments by parameter name......Page 131 9.2.3 Variable numbers of arguments......Page 132 9.3 Mutable objects as arguments......Page 133 9.4 Local, nonlocal, and global variables......Page 134 9.6 lambda expressions......Page 136 9.7 Generator functions......Page 137 9.8 Decorators......Page 138 9.9 Summary......Page 139 10.1 What is a module?......Page 140 10.2 A first module......Page 141 10.4 The module search path......Page 144 10.4.1 Where to place your own modules......Page 145 10.5 Private names in modules......Page 146 10.6 Library and third-party modules......Page 147 10.7 Python scoping rules and namespaces......Page 148 10.8 Summary......Page 153 11 Python programs......Page 154 11.1.1 Starting a script from a command line......Page 155 11.1.3 Redirecting the input and output of a script......Page 156 11.1.4 The optparse module......Page 157 11.1.5 Using the fileinput module......Page 158 11.4 Script execution options in Windows......Page 160 11.4.1 Starting a script as a document or shortcut......Page 161 11.4.3 Starting a script from a command window......Page 162 11.5 Scripts on Windows vs. scripts on UNIX......Page 163 11.6 Programs and modules......Page 165 11.7.3 Creating executable programs with freeze......Page 170 11.8 Summary......Page 171 12 Using the filesystem......Page 172 12.1.1 Absolute and relative paths......Page 173 12.1.2 The current working directory......Page 174 12.1.3 Manipulating pathnames......Page 175 12.1.4 Useful constants and functions......Page 178 12.2 Getting information about files......Page 179 12.3 More filesystem operations......Page 180 12.4 Processing all files in a directory subtree......Page 181 12.5 Summary......Page 182 13.1 Opening files and file objects......Page 184 13.3 Opening files in write or other modes......Page 185 13.4 Functions to read and write text or binary data......Page 186 13.5 Screen input/output and redirection......Page 188 13.6 Reading structured binary data with the struct module......Page 190 13.7 Pickling objects into files......Page 192 13.8 Shelving objects......Page 195 13.9 Summary......Page 196 14 Exceptions......Page 197 14.1.1 General philosophy of errors and exception handling......Page 198 14.1.2 A more formal definition of exceptions......Page 200 14.2 Exceptions in Python......Page 201 14.2.1 Types of Python exceptions......Page 202 14.2.2 Raising exceptions......Page 203 14.2.3 Catching and handling exceptions......Page 204 14.2.4 Defining new exceptions......Page 205 14.2.5 Debugging programs with the assert statement......Page 206 14.2.7 Example: a disk-writing program in Python......Page 207 14.2.8 Example: exceptions in normal evaluation......Page 208 14.3 Using with......Page 209 14.4 Summary......Page 210 15 Classes and object-oriented programming......Page 211 15.1.1 Using a class instance as a structure or record......Page 212 15.3 Methods......Page 213 15.4 Class variables......Page 215 15.4.1 An oddity with class variables......Page 216 15.5.1 Static methods......Page 217 15.5.2 Class methods......Page 218 15.6 Inheritance......Page 219 15.7 Inheritance with class and instance variables......Page 221 15.8 Private variables and private methods......Page 222 15.9 Using @property for more flexible instance variables......Page 223 15.10 Scoping rules and namespaces for class instances......Page 224 15.11 Destructors and memory management......Page 228 15.12 Multiple inheritance......Page 232 15.13 Summary......Page 233 16 Graphical user interfaces......Page 234 16.1 Installing Tkinter......Page 235 16.2 Starting Tk and using Tkinter......Page 236 16.3.2 Named attributes......Page 237 16.3.3 Geometry management and widget placement......Page 238 16.4 A simple Tkinter application......Page 239 16.5 Creating widgets......Page 240 16.6 Widget placement......Page 241 16.7 Using classes to manage Tkinter applications......Page 243 16.8 What else can Tkinter do?......Page 244 16.8.1 Event handling......Page 245 16.9 Alternatives to Tkinter......Page 246 16.10 Summary......Page 247 Part 3 Advanced language features......Page 248 17.1 What is a regular expression?......Page 250 17.2 Regular expressions with special characters......Page 251 17.3 Regular expressions and raw strings......Page 252 17.3.1 Raw strings to the rescue......Page 253 17.4 Extracting matched text from strings......Page 254 17.5 Substituting text with regular expressions......Page 257 17.6 Summary......Page 258 18.1 What is a package?......Page 259 18.2 A first example......Page 260 18.3 A concrete example......Page 261 18.3.1 Basic use of the mathproj package......Page 262 18.3.2 Loading subpackages and submodules......Page 263 18.3.4 __init__.py files in packages......Page 264 18.4 The __all__ attribute......Page 265 18.6 Summary......Page 266 19.1 Types are objects, too......Page 267 19.3 Types and user-defined classes......Page 268 19.4 Duck typing......Page 270 19.5 Summary......Page 271 20 Advanced object-oriented features......Page 272 20.1 What is a special method attribute?......Page 273 20.2.1 The __getitem__ special method attribute......Page 274 20.2.2 How it works......Page 275 20.2.3 Implementing full list functionality......Page 276 20.3 Giving an object full list capability......Page 277 20.4.1 Subclassing list......Page 279 20.4.2 Subclassing UserList......Page 280 20.6 Metaclasses......Page 281 20.7 Abstract base classes......Page 283 20.7.1 Using abstract base classes for type checking......Page 284 20.7.3 Using the @abstractmethod and @abstractproperty decorators......Page 285 20.8 Summary......Page 287 Part 4 Where can you go from here?......Page 288 21.1 Why you need to have tests......Page 290 21.2.1 Python’s __debug__ variable......Page 291 21.3 Tests in docstrings: doctests......Page 292 21.3.2 Tweaking doctests with directives......Page 294 21.4.1 Setting up and running a single test case......Page 295 21.4.3 Running multiple tests......Page 297 21.5 Summary......Page 298 22.1 Porting from 2 to 3......Page 299 22.1.1 Steps in porting from Python 2.x to 3.x......Page 300 22.2 Testing with Python 2.6 and -3......Page 301 22.3 Using 2to3 to convert the code......Page 302 22.4 Testing and common problems......Page 304 22.5.1 Using Python 2.5 or earlier......Page 305 22.6 Summary......Page 306 23.1 “Batteries included”—the standard library......Page 307 23.1.1 Managing various data types......Page 308 23.1.2 Manipulating files and storage......Page 309 23.1.3 Accessing operating system services......Page 310 23.1.5 Development and debugging tools and runtime services......Page 311 23.3 Adding more Python libraries......Page 312 23.4.1 Installing under the home scheme......Page 313 23.6 Summary......Page 314 24 Network, web, and database programming......Page 315 24.1.1 Using the sqlite3 database......Page 316 24.2.1 Creating an instant HTTP server......Page 318 24.2.2 Writing an HTTP client......Page 319 24.3.2 Using the wsgi library to create a basic web app......Page 320 24.3.3 Using frameworks to create advanced web apps......Page 321 24.4.1 Creating the database......Page 322 24.4.3 Adding a form and retrieving its contents......Page 323 24.4.4 Saving the form’s contents......Page 324 24.4.5 Parsing the URL and retrieving messages......Page 325 24.4.6 Adding an HTML wrapper......Page 328 24.5 Summary......Page 329 A guide to Python’s documentation......Page 330 The Python manual of style......Page 333 The Zen of Python......Page 346 A......Page 348 C......Page 349 D......Page 350 F......Page 351 H......Page 352 L......Page 353 N......Page 354 P......Page 355 S......Page 357 T......Page 359 W......Page 360 Z......Page 361 back cover......Page 362

The Quick Python Book, Second Edition, is a clear, concise introduction to Python 3, aimed at programmers new to Python. This updated edition includes all the changes in Python 3, itself a significant shift from earlier versions of Python.

The book begins with basic but useful programs that teach the core features of syntax, control flow, and data structures. It then moves to larger applications involving code management, object-oriented programming, web development, and converting code from earlier versions of Python.

True to his audience of experienced developers, the author covers common programming language features concisely, while giving more detail to those features unique to Python.

Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book.

The Quick Python Book, Second Edition , is a clear, concise introduction to Python 3, aimed at programmers new to Python. This updated edition includes all the changes in Python 3, itself a significant shift from earlier versions of Python. The book begins with basic but useful programs that teach the core features of syntax, control flow, and data structures. It then moves to larger applications involving code management, object-oriented programming, web development, and converting code from earlier versions of Python. True to his audience of experienced developers, the author covers common programming language features concisely, while giving more detail to those features unique to Python. Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book. "The Quick Python Book, Second Edition, is a clear, concise introduction to Python 3, aimed at programmers new to Python. This updated edition includes all the changes in Python 3, itself a significant shift from earlier versions of Python. The book begins with basic but useful programs that teach the core features of syntax, control flow, and data structures. It then moves to larger applications involving code management, object-oriented programming, web development, and converting code from earlier versions of Python. True to his audience of experienced developers, the author covers common programming language features concisely, while giving more detail to those features unique to Python"--Resource description page "The Quick Python Book, Second Edition, is a clear, concise introduction to Python 3, aimed at programmers new to Python. This updated edition includes all the changes in Python 3, itself a significant shift from earlier versions of Python. The book begins with basic but useful programs that teach the core features of syntax, control flow, and data structures. It then moves to larger applications involving code management, object-oriented programming, web development, and converting code from earlier versions of Python. True to his audience of experienced developers, the author covers common programming language features concisely, while giving more detail to those features unique to Python"--Publisher's description

قیمت نهایی

۴۴٬۰۰۰ تومان