Functional Python Programming

Steven Lott

  • 出版商: Packt Publishing
  • 出版日期: 2015-01-31
  • 售價: $2,170
  • 貴賓價: 9.5$2,062
  • 語言: 英文
  • 頁數: 360
  • 裝訂: Paperback
  • ISBN: 1784396990
  • ISBN-13: 9781784396992
  • 相關分類: Python程式語言
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

Key Features

  • Implement common functional programming design patterns and techniques in Python
  • Learn how to choose between imperative and functional approaches based on expressiveness, clarity, and performance
  • Apply functional Python to common Exploratory Data Analysis (EDA) programming problems

Book Description

Python’s easy-to-learn and extensible abilities offer a number of functional programming features for you to bring into your workflow, especially in the realm of data science.

If you’re a Python developer who wants to discover how to take the power of functional programming and bring it into your own programs then this book is essential for you, even if you know next to nothing about the paradigm. Starting with a general overview of functional concepts you’ll explore common functional features such as first-class and higher-order functions, pure functions and more, and how these are accomplished in Python to give you the core foundations you’ll build upon. After that, you’ll discover common functional optimizations for Python to help your apps reach even higher speeds. You'll also explore data preparation techniques and data exploration in depth, along with learning how the Python standard library fits the functional programming model. Finally, to top off your journey into the world of function Python you’ll at look at the PyMonad project and some larger examples to put everything into perspective.

With Functional Python Programming by your side you’ll understand the core concepts of function Python, its impact on the programming workflow, and how to implement it in Python, giving you the ability to take your applications to an even higher level.

What you will learn

  • Use Python's generator functions and generator expressions to work with collections in a non-strict (or lazy) manner
  • Utilize Python library modules including itertools, functools, multiprocessing, and concurrent.futures for efficient functional programs
  • Use Python strings with object-oriented suffix notation and prefix notation
  • Avoid stateful classes by making use of families of tuples
  • Design and implement decorators to create composite functions
  • Use functions like max(), min(), map(), filter(), and sorted()
  • Write advanced higher-order functions

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

  1. Introducing Functional Programming
  2. Introducing Some Functional Features
  3. Functions, Iterators, and Generators
  4. Working with Collections
  5. Higher-order Functions
  6. Recursions and Reductions
  7. Additional Tuple Techniques
  8. The Itertools Module
  9. More Itertools Techniques
  10. The Functools Module
  11. Decorator Design Techniques
  12. The Multiprocessing and Threading Modules
  13. Conditional Expressions and the Operator Module
  14. The Pymonad Library
  15. A Functional Approach to Web Services
  16. Optimizations and Improvements

商品描述(中文翻譯)

主要特點


  • 在Python中實現常見的函數式編程設計模式和技巧

  • 根據表達能力、清晰度和性能選擇命令式和函數式方法

  • 將函數式Python應用於常見的探索性數據分析(EDA)編程問題

書籍描述

Python易於學習和擴展的能力為您提供了許多函數式編程特性,尤其是在數據科學領域。

如果您是一位Python開發人員,想要了解如何將函數式編程的威力引入自己的程序中,那麼這本書對您來說是必不可少的,即使您對這種編程范式幾乎一無所知。從函數式概念的概述開始,您將探索常見的函數式特性,如一級和高階函數、純函數等,以及這些特性在Python中的實現方式,為您打下核心基礎。之後,您將發現Python的常見函數式優化,以幫助您的應用程序達到更高的速度。您還將深入探討數據準備技術和數據探索,以及學習Python標準庫如何符合函數式編程模型。最後,為了總結您對函數式Python世界的探索,您將研究PyMonad項目和一些更大的示例。

有了《函數式Python編程》作為您的指南,您將了解函數式Python的核心概念,它對編程工作流程的影響,以及如何在Python中實現它,使您能夠將應用程序提升到更高的水平。

您將學到什麼


  • 使用Python的生成器函數和生成器表達式以非嚴格(或惰性)方式處理集合

  • 利用Python庫模塊,包括itertools、functools、multiprocessing和concurrent.futures,實現高效的函數式程序

  • 使用面向對象的後綴表示法和前綴表示法處理Python字符串

  • 通過使用元組族避免有狀態的類

  • 設計和實現裝飾器以創建組合函數

  • 使用max()、min()、map()、filter()和sorted()等函數

  • 編寫高級高階函數

關於作者

Steven F. Lott從70年代開始從事編程工作,當時計算機體積龐大、昂貴且稀有。作為一名合同軟件開發人員和架構師,他參與了數百個項目,從非常小的項目到非常大的項目。他已經使用Python解決業務問題超過10年。

目錄


  1. 介紹函數式編程

  2. 介紹一些函數式特性

  3. 函數、迭代器和生成器

  4. 處理集合

  5. 高階函數

  6. 遞歸和歸納

  7. 其他元組技巧

  8. itertools模塊

  9. 更多itertools技巧

  10. functools模塊

  11. 裝飾器設計技巧

  12. multiprocessing和threading模塊

  13. 條件表達式和operator模塊

  14. Pymonad庫

  15. 面向函數的Web服務

  16. 優化和改進