Python 3-3 functions and methods
Others
2021-01-26 22:58:25
views: null
1. Classification
1. Classification of functions:
- Built-in functions: some functions embedded in python.
- Anonymous function: A line of code implements a function.
- recursive function
- Custom function: Define the function according to your own needs.
2. Classification of methods:
- Instance method: a method called directly with self.
- Private method: __ function name, a method that can only be called in the class.
- Property method: @property, disguise the method as a property to make the code look more reasonable.
Origin blog.csdn.net/weixin_43955170/article/details/113105522