Chapter 11. Functions and Functional Programming


Chapter Topics

  • What Are Functions?

  • Calling Functions

  • Creating Functions

  • Passing Functions

  • Formal Arguments

  • Variable-Length Arguments

  • Functional Programming

  • Variable Scope

  • Recursion

  • Generators

We were introduced to functions in Chapter 2, and we have seen them created and called throughout the text. In this chapter, we will look beyond the basics and give you a full treatment of all the other features associated with functions. In addition to the expected behavior, functions in Python support a variety of invocation styles and argument types, including some functional programming interfaces. We conclude this chapter with a look at Python's scoping and take an optional side trip into the world of recursion.



Core Python Programming
Core Python Programming (2nd Edition)
ISBN: 0132269937
EAN: 2147483647
Year: 2004
Pages: 334
Authors: Wesley J Chun

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net