python object oriented programming

__ slots__ magic Python is a language Dynamic language . Usually, dynamic languages allow us to bind new properties or methods to objects when the program is running. Of course, we can also unbind the bound properties and methods. However, if we need to restrict objects of custom types to bind only some properties, we can define them in the c ...

Posted by FD_F on Sat, 02 Oct 2021 01:48:26 +0200

Python learning notes: object oriented programming! (come here first, there's no time to change recently!)

1, Object oriented The core of process oriented programming is process (pipeline thinking). Process is the step to solve the problem. Process oriented design is like carefully designing a pipeline and considering when to deal with what. The advantage is that it greatly reduces the complexity of writing programs, and only needs to stack the cod ...

Posted by falled on Tue, 28 Sep 2021 05:42:09 +0200

Python object oriented

Object oriented lesson 1: classes and objects At the beginning, object-oriented allows developers to define their own data types. There are two cores: one is type (class for short) and the other is object (instance). As we learned earlier, typeType nameobjectintegerint-1,1,2,100Floating point numberfloat3.14,10.1,-2.5None typeNoneTypeNoneBool ...

Posted by mniessen on Sat, 18 Sep 2021 07:27:13 +0200