Object-Oriented Programming
An object is a real entity that can be specifically described.
Object-oriented programming is a kind of God perspective, which can make rules.
Most of the previous studies are process-oriented programming, with a fixed result being executed
Process-oriented programming, good thinking, poor scalability, easy to cause code security issues
Object-oriented with: Class, Object
When object-oriented is used: When you need to pass the same parameters over and over again to some functions
Here's a practical example of an object-oriented case.
class Person:def __init__ (Self,name,age, Sex,weight): self.name = name self.age = = sex self.weight = weight def info (self): print ( " name:%s, age :%s, Gender:%s, Weight:%s "% (Self.name,self.age, self.sex,self.weight)) Name = person ( " Zhang San ", 18 , '
Object-oriented of the basic Python article