All Python objects have three properties: identity, type, and value
Identity:
Each object has a unique identity that identifies itself, and any object's identity can be obtained using the built-in function ID ().
Once a Python object is created, it cannot change its identity type. Changing an object means creating a new object and changing the reference.
Object:
The type of object determines what type of value the object can hold, what actions can be taken, and what rules to follow. The type of Python object can be viewed with the built-in function type ()
Because types are also objects in Python, type () returns an object instead of a simple string.
Value:
object represents the data item.
If an object supports an update operation, its value can be changed, otherwise its value is read-only. Whether the value of the object can be changed to be known as the object's change (mutability)
Standard type operators
Object value Comparison:
= =, >, <, etc.
Object Identity Comparison:
Obj1 is obj2, obj is not obj2
>>> a = 4.3>>> B = 4.3>>> a==btrue is bfalse
Boolean type:
Not, and, or
Standard type built-in functions
Type (obj), CMP (OBJ1, OBJ2), str (obj), repr (obj)
2015-05-25
Object of Python