Advertisement

Functional Programming Aids

  • T. R. PadmanabhanEmail author
Chapter

Abstract

The modules available as functional programming aids are dealt with here. The built-in functions for algebra and logic operation are defined as convenient functions in the operator module. ‘Itemgetter’, ‘attrgetter’ and ‘methodcaller’ are available as generic methods. ‘inplace’ operators corresponding to all composite algebraic and logic operations are available as corresponding useful functions. Compact iterators formed around common functions are available in ‘itertools’. Their use is illustrated. The yield construct is for transforming a function into a corresponding generator. Going a step further ‘yield from’ chains generators for multiple sequences. Decorator provides an elegant template for nested suites. Their use is illustrated through examples. A number of readymade decorators and functions in the ‘functools’ module have been explained through illustrative examples.

Keywords

Operator Module Vector Magnitude Comparison Operation Single String Random Number Sequence 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. Anton H, Rorres C (2005) Elementary linear algebra. Wiley, New JeresyGoogle Scholar
  2. van Rossum G, Drake FL Jr (2014) The Python library reference. Python software foundationGoogle Scholar
  3. Zwillinger D (ed) (2003) Standard mathematical tables and formulae. Chapman & Hall/CRC, New YorkGoogle Scholar

Copyright information

© Springer Nature Singapore Pte Ltd. 2016

Authors and Affiliations

  1. 1.Amrita UniversityCoimbatoreIndia

Personalised recommendations