Introduction to Python Functional programming

Source: Internet
Author: User
Function

  function is a kind of encapsulation supported by Python, we can decompose complex tasks into simple tasks by splitting large pieces of code into functions through a layer of function calls, which can be called process-oriented programming . function is the basic unit of process-oriented program design.

Functional programming (functional programming)

  Functional Programming is an abstraction of a very high degree of programming paradigm . Purely functional programming languages do not have variables, so any function, as long as the input is OK, the output is OK, this pure function We call no side effects. Instead of pure functions (which allow the use of variables), because of the variable state inside the function is not deterministic, the same input, it is possible to get different output, so this function has side effects .

 features of functional programming : Allows the function itself to be passed as a parameter to another function, and also allows a function to be returned.

Python provides partial support for functional programming , and Python is not a purely functional programming language, since Python allows the use of variables.

Resources

Liaoche Python-Functional programming

Introduction to Python Functional programming

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.