Python's Growth Road [Part 5]: Object-Oriented Python Foundation

1. Three programming paradigms

Originally clear source one: Some people say that functional programming is to use functional programming --> error

A programming paradigm is a methodology of programming that identifies a programming style

After everyone has learned the basic Python syntax, everyone can write Python code, and then everyone has a different style of writing code, and these different styles represent different genres

If the basic syntax of Python is compared to the basic skills of martial arts, then different programming styles are like different martial arts schools

Although everyone has different styles, they can all fulfill your programming needs. Python is an object-oriented programming language, but so far, you have never been exposed to object-oriented programming, but you can already solve many problems. No one forces you to use a fixed style

There is no martial art that is invincible in the world, and different styles have their own brilliance in different scenarios.

Three programming paradigms:

1. Process-oriented programming: cover the crotch

2. Functional programming: Emei School

3. Object-Oriented Programming: Shaolin's Egg Yolk Pie

The evolution of programming

1. The beginning of programming is unorganized and unstructured, and instructions are written step by step from a simple control flow

2. Extract the repeated code block logic from the above instructions and organize them together (for example, you define a function), which realizes code reuse, and the code changes from unstructured to structured, and the process of creating programs changes. more logical

 

 

 

 

 

 

 

Python's growth path [Part 5]: Python-based modules

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324737649&siteId=291194637