- Functional Python Programming
- Steven F. Lott
- 250字
- 2021-08-27 19:20:18
Preface
Functional programming offers a variety of techniques for creating succinct and expressive software. While Python is not a purely functional programming language, we can do a great deal of functional programming in Python.
Python has a core set of functional programming features. This lets us borrow many design patterns and techniques from other functional languages. These borrowed concepts can lead us to create succinct and elegant programs. Python's generator expressions, in particular, negate the need to create large in-memory data structures, leading to programs that may execute more quickly because they use fewer resources.
We can’t easily create purely functional programs in Python. Python lacks a number of features that would be required for this. We don’t have unlimited recursion, for example, we don’t have lazy evaluation of all expressions, and we don’t have an optimizing compiler.
There are several key features of functional programming languages that are available in Python. One of the most important ones is the idea of functions being first-class objects. Python also offers a number of higher-order functions. The built-in map(), filter(), and functools.reduce() functions are widely used in this role, and less-obvious are functions such as sorted(), min(), and max().
We’ll look at the core features of functional programming from a Python point of view. Our objective is to borrow good ideas from functional programming languages and use those ideas to create expressive and succinct applications in Python.
- 精通JavaScript+jQuery:100%動態(tài)網(wǎng)頁設(shè)計密碼
- Getting Started with CreateJS
- Learning Linux Binary Analysis
- Python金融數(shù)據(jù)分析
- Groovy for Domain:specific Languages(Second Edition)
- Data Analysis with IBM SPSS Statistics
- Mastering Yii
- 運用后端技術(shù)處理業(yè)務(wù)邏輯(藍橋杯軟件大賽培訓教材-Java方向)
- Julia高性能科學計算(第2版)
- Unity UI Cookbook
- Java Fundamentals
- 響應(yīng)式Web設(shè)計:HTML5和CSS3實戰(zhàn)(第2版)
- 零基礎(chǔ)學C語言程序設(shè)計
- ExtJS Web應(yīng)用程序開發(fā)指南第2版
- PHP 7從零基礎(chǔ)到項目實戰(zhàn)