Python Essentials - A Rapid Guide to the Fundamental Features of Python
Steven F. Lott
- 出版商: Packt Publishing
- 出版日期: 2015-06-30
- 售價: $1,810
- 貴賓價: 9.5 折 $1,720
- 語言: 英文
- 頁數: 298
- 裝訂: Paperback
- ISBN: 1784390348
- ISBN-13: 9781784390341
-
相關分類:
Python、程式語言
海外代購書籍(需單獨結帳)
相關主題
商品描述
Key Features
- Learn how to write effective Python code
- Get up-to-speed with the most important data structures in Python, using sequences, sets, and mappings
- Explore Python's impressive range of features and discover why it's one of the most popular programming languages in the world
Book Description
Python Essentials provides a vital tour of the most critical features of Python. Starting with setup and installation, you will soon dive into exploring built-in-library types, Python's rich collection of operators and built-in functions, variables, assignment and scoping rules.
From this foundation, you will explore functions, a crucial aspect of any programming language, including considerable sophistication in defining parameters to a function and providing argument values. Explore advanced functional programming using generator expressions, comprehensions, and generator functions. Handle file input and output using web services and context managers, exception handling and explore wider, popular frameworks.
Through this concise and practical guide, you will explore all you need to know to leverage this powerful, and industry-standard, programming language.
What you will learn
- Use Python interactively and master the art of writing efficient Python scripts
- Learn techniques for working with string data, including how to use regular expressions to parse strings
- Get to know how the short-circuit and if-else logic operators work
- Explore mutable data structures including list, set, and dict
- Define functions with positional and optional parameters, and learn to use keyword argument values when calling a function
- Write generator functions, generator expressions, and comprehensions
- Master the use of exceptions for handling errors and other unexpected conditions
- Understand the importance of working with files, context manager, and the with statement
About the Author
Steven F. Lott has been programming since the 70s, when computers were large, expensive, and rare. As a contract software developer and architect, he has worked on hundreds of projects, from very small to very large. He's been using Python to solve business problems for over 10 years
Table of Contents
- Getting Started
- Simple Data Types
- Expressions and Output
- Variables, Assignment and Scoping Rules
- Logic, Comparisons, and Conditions
- More Complex Data Types
- Basic Function Definitions
- More Advanced Functions
- Exceptions
- Files, Databases, Networks, and Contexts
- Class Definitions
- Scripts, Modules, Packages, Libraries, and Applications
- Metaprogramming and Decorators
- Fit and Finish Unit Testing, Packaging, and Documentation
- Next Steps
商品描述(中文翻譯)
關鍵特點
- 學習如何撰寫有效的 Python 代碼
- 熟悉 Python 中最重要的數據結構,包括序列、集合和映射
- 探索 Python 的豐富功能,了解為何它是全球最受歡迎的程式語言之一
書籍描述
《Python Essentials》提供了 Python 最關鍵特性的必要導覽。從設置和安裝開始,您將迅速深入探索內建庫類型、Python 豐富的運算子和內建函數、變數、賦值和範圍規則。
在此基礎上,您將探索函數,這是任何程式語言中至關重要的方面,包括在定義函數參數和提供參數值方面的相當複雜性。探索使用生成器表達式、推導式和生成器函數的高級函數式編程。使用網路服務和上下文管理器處理文件的輸入和輸出,進行例外處理,並探索更廣泛的流行框架。
通過這本簡明而實用的指南,您將探索所有需要了解的內容,以利用這種強大且行業標準的程式語言。
您將學到的內容
- 互動式使用 Python,掌握撰寫高效 Python 腳本的技巧
- 學習處理字串數據的技術,包括如何使用正則表達式解析字串
- 了解短路和 if-else 邏輯運算子的運作方式
- 探索可變數據結構,包括列表、集合和字典
- 定義具有位置和可選參數的函數,並學習在調用函數時使用關鍵字參數值
- 撰寫生成器函數、生成器表達式和推導式
- 精通使用例外來處理錯誤和其他意外情況
- 理解處理文件、上下文管理器和 with 語句的重要性
關於作者
**Steven F. Lott** 自 70 年代以來一直在編程,當時的電腦龐大、昂貴且稀有。作為一名合約軟體開發者和架構師,他參與了數百個項目,從非常小到非常大。他已經使用 Python 解決商業問題超過 10 年。
目錄
1. 開始使用
2. 簡單數據類型
3. 表達式和輸出
4. 變數、賦值和範圍規則
5. 邏輯、比較和條件
6. 更複雜的數據類型
7. 基本函數定義
8. 更高級的函數
9. 例外
10. 文件、數據庫、網路和上下文
11. 類定義
12. 腳本、模組、套件、庫和應用程式
13. 元編程和裝飾器
14. 測試、打包和文檔的適合性和完成度
15. 下一步