Functional Python Programming, 3rd Edition Use a Functional Approach to Write Succinct, Expressive, and Efficient Python Code

Saved in:
Bibliographic Details
Main Authors: Lott, Steven F, Bánffy, Ricardo
Format: eBook
Language:English
Published: Birmingham Packt Publishing, Limited 2022
Packt Publishing Limited
Edition:3
Subjects:
ISBN:1803232579, 9781803232577
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Author Bánffy, Ricardo
Lott, Steven F
Author_xml – sequence: 1
  fullname: Lott, Steven F
– sequence: 2
  fullname: Bánffy, Ricardo
BookMark eNpVj01LAzEQhiN-oK09et-jitUks_k61tKqULAHPS-zSbZWt4lmd5H-e1eqgnOZeeB5X5gBOQgxeELOGL2m_dwYpZmmwEEKqffI4A_k_i9wocxRDyCkUDnN82MyaprXPs01M1TzE3I574Jt1zFgnS237UsM2TLFVcLNZh1WVxkkl83c-ts4JYcV1o0f_ewheZ7Pnqb348Xj3cN0shij5JqPhZDGVB5Lr7y2QqA0qCtbqlw5CdoZi5I5V3G0uWel4EA9QgXKcNDCOBiSi13vJ9atT86vUrftj2KDyRb_3u7d8537nuJH55u28GWMb9aHNmFdzG6nQIEyzRl8ARSfVp8
ContentType eBook
DEWEY 005.133
DOI 10.0000/9781803236568
DeliveryMethod fulltext_linktorsrc
Discipline Computer Science
EISBN 1803236566
9781803236568
Edition 3
ExternalDocumentID 9781803236568
EBC30301821
GroupedDBID 38.
AABBV
AAZEP
ABMRC
ACBYE
ACXXF
AEIUR
AHWGJ
ALMA_UNASSIGNED_HOLDINGS
BBABE
BPBUR
CZZ
EBSCA
ECNEQ
IIUVB
K-E
OHILO
OODEK
QD8
TD3
ID FETCH-LOGICAL-a6282-55699feabe7e8c55a69a8fcb747d638d9ca61ddf2ac4e1b5230ea3f37923859d3
ISBN 1803232579
9781803232577
IngestDate Fri Nov 21 20:14:49 EST 2025
Wed Nov 26 02:54:42 EST 2025
IsPeerReviewed false
IsScholarly false
LCCallNum_Ident QA76.62 .L688 2022
Language English
LinkModel OpenURL
MergedId FETCHMERGED-LOGICAL-a6282-55699feabe7e8c55a69a8fcb747d638d9ca61ddf2ac4e1b5230ea3f37923859d3
OCLC 1356574044
PQID EBC30301821
PageCount 577
ParticipantIDs walterdegruyter_marc_9781803236568
proquest_ebookcentral_EBC30301821
PublicationCentury 2000
PublicationDate 2022
[2022]
PublicationDateYYYYMMDD 2022-01-01
PublicationDate_xml – year: 2022
  text: 2022
PublicationDecade 2020
PublicationPlace Birmingham
PublicationPlace_xml – name: Birmingham
– name: Birmingham, UK
PublicationYear 2022
Publisher Packt Publishing, Limited
Packt Publishing Limited
Publisher_xml – name: Packt Publishing, Limited
– name: Packt Publishing Limited
RestrictionsOnAccess restricted access
SSID ssj0002819082
Score 2.2581978
SourceID walterdegruyter
proquest
SourceType Publisher
SubjectTerms COMPUTERS / Programming / General
COMPUTERS / Programming / Object Oriented
COMPUTERS / Programming Languages / Python
Functional programming (Computer science)
Python (Computer program language)
Subtitle Use a Functional Approach to Write Succinct, Expressive, and Efficient Python Code
TableOfContents Cover -- Copyright -- Contributors -- Table of Contents -- Preface -- Chapter 1: Understanding Functional Programming -- The functional style of programming -- Comparing and contrasting procedural and functional styles -- Using the functional paradigm -- Using a functional hybrid -- The stack of turtles -- A classic example of functional programming -- Exploratory data analysis -- Summary -- Exercises -- Convert an imperative algorithm to functional code -- Convert step-wise computation to functional code -- Revise the sqrt() function -- Data cleansing steps -- (Advanced) Optimize this functional code -- Chapter 2: Introducing Essential Functional Concepts -- Functions as first-class objects -- Pure functions -- Higher-order functions -- Immutable data -- Strict and non-strict evaluation -- Lazy and eager evaluation -- Recursion instead of an explicit loop state -- Functional type systems -- Familiar territory -- Learning some advanced concepts -- Summary -- Exercises -- Apply map() to a sequence of values -- Function vs. lambda design question -- Optimize a recursion -- Chapter 3: Functions, Iterators, and Generators -- Writing pure functions -- Functions as first-class objects -- Using strings -- Using tuples and named tuples -- Using generator expressions -- Exploring the limitations of generators -- Combining generator expressions -- Cleaning raw data with generator functions -- Applying generators to built-in collections -- Generators for lists, dicts, and sets -- Using stateful mappings -- Using the bisect module to create a mapping -- Using stateful sets -- Summary -- Exercises -- Rewrite the some_function() function -- Alternative Mersenne class definition -- Alternative algorithm implementations -- Map and filter -- Dictionary comprehension -- Raw data cleanup -- Chapter 4: Working with Collections -- An overview of function varieties
Working with iterables -- Parsing an XML file -- Parsing a file at a higher level -- Pairing up items from a sequence -- Using the iter() function explicitly -- Extending an iteration -- Applying generator expressions to scalar functions -- Using any() and all() as reductions -- Using len() and sum() on collections -- Using sums and counts for statistics -- Using zip() to structure and flatten sequences -- Unzipping a zipped sequence -- Flattening sequences -- Structuring flat sequences -- Structuring flat sequences - an alternative approach -- Using sorted() and reversed() to change the order -- Using enumerate() to include a sequence number -- Summary -- Exercises -- Palindromic numbers -- Hands of cards -- Replace legs() with pairwise() -- Chapter 5: Higher-Order Functions -- Using max() and min() to find extrema -- Using Python lambda forms -- Lambdas and the lambda calculus -- Using the map() function to apply a function to a collection -- Working with lambda forms and map() -- Using map() with multiple sequences -- Using the filter() function to pass or reject data -- Using filter() to identify outliers -- The iter() function with a sentinel value -- Using sorted() to put data in order -- Overview of writing higher-order functions -- Writing higher-order mappings and filters -- Unwrapping data while mapping -- Wrapping additional data while mapping -- Flattening data while mapping -- Structuring data while filtering -- Building higher-order functions with callables -- Assuring good functional design -- Review of some design patterns -- Summary -- Exercises -- Classification of state -- Classification of state, Part II -- Optimizing a file parser -- Chapter 6: Recursions and Reductions -- Simple numerical recursions -- Implementing manual tail-call optimization -- Leaving recursion in place -- Handling difficult tail-call optimization
Creating pairs with pairwise()) -- Filtering with compress() -- Picking subsets with islice() -- Stateful filtering with dropwhile() and takewhile() -- Two approaches to filtering with filterfalse() and filter() -- Applying a function to data via starmap() and map() -- Cloning iterators with tee() -- The itertools recipes -- Summary -- Exercises -- Optimize the find_first() function -- Compare Chapter 4 with the itertools.pairwise() recipe -- Compare Chapter 4 with itertools.tee() recipe -- Splitting a dataset for training and testing purposes -- Rank ordering -- Chapter 9: Itertools for Combinatorics - Permutations and Combinations -- Enumerating the Cartesian product -- Reducing a product -- Computing distances -- Getting all pixels and all colors -- Performance improvements -- Rearranging the problem -- Combining two transformations -- Permuting a collection of values -- Generating all combinations -- Combinations with replacement -- Recipes -- Summary -- Exercises -- Alternative distance computations -- Actual domain of pixel color values -- Cribbage hand scoring -- Chapter 10: The Functools Module -- Function tools -- Memoizing previous results with cache -- Defining classes with total ordering -- Applying partial arguments with partial() -- Reducing sets of data with the reduce() function -- Combining map() and reduce() -- Using the reduce() and partial() functions -- Using the map() and reduce() functions to sanitize raw data -- Using the groupby() and reduce() functions -- Avoiding problems with reduce() -- Handling multiple types with singledispatch -- Summary -- Exercises -- Compare string.join() and reduce() -- Extend the comma_fix() function -- Revise the clean_sum() function -- Chapter 11: The Toolz Package -- The itertools star map function -- Reducing with operator module functions -- Using the toolz package -- Some itertoolz functions
More complex multiprocessing architectures
Processing collections through recursion -- Tail-call optimization for collections -- Using the assignment (sometimes called the "walrus") operator in recursions -- Reductions and folding a collection from many items to one -- Tail-call optimization using deques -- Group-by reduction from many items to fewer -- Building a mapping with Counter -- Building a mapping by sorting -- Grouping or partitioning data by key values -- Writing more general group-by reductions -- Writing higher-order reductions -- Writing file parsers -- Parsing CSV files -- Parsing plain text files with headers -- Summary -- Exercises -- Multiple recursion and caching -- Refactor the all_print() function -- Parsing CSV files -- Classification of state, Part III -- Diesel engine data -- Chapter 7: Complex Stateless Objects -- Using tuples to collect data -- Using NamedTuple to collect data -- Using frozen dataclasses to collect data -- Complicated object initialization and property computations -- Using pyrsistent to collect data -- Avoiding stateful classes by using families of tuples -- Computing Spearman's rank-order correlation -- Polymorphism and type pattern matching -- Summary -- Exercises -- Frozen dictionaries -- Dictionary-like sequences -- Revise the rank_xy() function to use native types -- Revise the rank_corr() function -- Revise the legs() function to use pyrsistent -- Chapter 8: The Itertools Module -- Working with the infinite iterators -- Counting with count() -- Counting with float arguments -- Re-iterating a cycle with cycle() -- Using cycle() for data sampling -- Repeating a single value with repeat() -- Using the finite iterators -- Assigning numbers with enumerate() -- Running totals with accumulate() -- Combining iterators with chain() -- Partitioning an iterator with groupby() -- Merging iterables with zip_longest() and zip()
Some dicttoolz functions -- Some functoolz functions -- Summary -- Exercises -- Replace true division with a fraction -- Color file parsing -- Anscombe's quartet parsing -- Waypoint computations -- Waypoint geofence -- Callable object for the row_counter() function -- Chapter 12: Decorator Design Techniques -- Decorators as higher-order functions -- Using the functools update_wrapper() function -- Cross-cutting concerns -- Composite design -- Preprocessing bad data -- Adding a parameter to a decorator -- Implementing more complex decorators -- Complicated design considerations -- Summary -- Exercises -- Datetime conversions -- Optimize a decorator -- None-tolerant functions -- Logging -- Dry-run check -- Chapter 13: The PyMonad Library -- Downloading and installing -- Functional composition and currying -- Using curried higher-order functions -- Functional composition with PyMonad -- Functors - making everything a function -- Using the lazy ListMonad() monad -- Monad bind() function -- Implementing simulation with monads -- Additional PyMonad features -- Summary -- Exercises -- Revise the arctangent series -- Statistical computations -- Data validation -- Multiple models -- Chapter 14: The Multiprocessing, Threading, and Concurrent.Futures Modules -- Functional programming and concurrency -- What concurrency really means -- The boundary conditions -- Sharing resources with process or threads -- Where benefits will accrue -- Using multiprocessing pools and tasks -- Processing many large files -- Parsing log files - gathering the rows -- Parsing log lines into named tuples -- Parsing additional fields of an Access object -- Filtering the access details -- Analyzing the access details -- The complete analysis process -- Using a multiprocessing pool for concurrent processing -- Using apply() to make a single request
Functional Python Programming, 3rd edition: Use a functional approach to write succinct, expressive, and efficient Python code
Title Functional Python Programming, 3rd Edition
URI https://ebookcentral.proquest.com/lib/[SITE_ID]/detail.action?docID=30301821
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwtV1LT8MwDI5g48CFN2K8VBAnoGJNmja5Mg0hgaYdhrRbleaBEKKgrYPt3-O02aMTBzhwidooaVW7smP7s43QhTRNRcI49EMdUz-UrAly0FgQQIy1YZHAUhXNJuJOh_X7vOsKPA6LdgJxlrHxmH_8K6thDphtU2f_wO7ZQ2ECroHpMALbYVw6Ec9uXSMiUFHOs9ed2JIANgvAgq_eXN8SMlBXoKsWQ--PDq9RNjdzMF_nBMB4yQnQFfI1X3RcVbOjSmMxYE2CCZzf2E-i0yquEi1RXVctUb2kOmaAvsq2VVTHISW2k8GDP_d42ZAdHDjKQqf2dTeVXZUj_sZXARZQ-nkwmuTT4HSh83tbqK5tIsg2WtHZDtqctr_wnDTcRZdzgnslwb0Fgl97QG7PkXsPPd21e61737We8EUERqhPacS50SLVsWaSUhFxwYxMwfhSILEUlyIKlDJYyFAHqXWta0EMsdUYGeWK7KNa9p7pA-SpNNAqlZRxg0MmFOeUSmkUs8JVBrSBzqbfnRQBcofKTdq3LWINVoaDBjpfIkhiK50kFQIe_mbREVqf_z_HqJYPRvoErcnP_GU4OC0Y9g16RyNB
linkProvider Knovel
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.title=Functional+Python+Programming%2C+3rd+edition&rft.au=Lott%2C+Steven+F&rft.date=2022-01-01&rft.pub=Packt+Publishing+Limited&rft.isbn=9781803236568&rft_id=info:doi/10.0000%2F9781803236568&rft.externalDBID=n%2Fa&rft.externalDocID=9781803236568
thumbnail_l http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=9781803232577/lc.gif&client=summon&freeimage=true
thumbnail_m http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=9781803232577/mc.gif&client=summon&freeimage=true
thumbnail_s http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=9781803232577/sc.gif&client=summon&freeimage=true