| Callable (object) |
Check whether the object is callable 1. classes can be called. 2. The instance cannot be called unless the _ call _ method is declared in the class. |
| Classmethod () |
1. annotation, used to indicate that this method is a Class Method 2. A class method can be called by a class or an instance. 3. The class method is similar to the static method in Java. 4. The self parameter is not required in class methods. |
| Compile (source, filename, mode [, flags [, dont_inherit]) |
Compile source as a code or AST object. Code objects can be evaluated using exec statements or eval. 1. Parameter source: string or AST (Abstract Syntax Trees) object. 2. filename: name of the code file. If the code is not read from the file, some identifiable values are passed. 3. Parameter model: specifies the type of the compiled code. You can specify it as 'exec ', 'eval', and 'singles '. 4. Parameters flag and dont_inherit |
| Dir ([object]) |
1. If no parameter is specified, a list of variables, methods, and definitions in the current range is returned; 2. When a parameter is included, the attribute and method list of the parameter are returned. 3. If the parameter contains method _ dir _ (), this method will be called. When the parameter is instance. 4. If the parameter does not contain _ dir _ (), this method collects parameter information to the maximum extent. |
| Delattr (object, name) |
Delete the property of the object named name |
| Eval (expression [, globals [, locals]) |
Calculates the expression value. |
| Execfile (filename [, globals [, locals]) |
The usage is similar to exec (). The difference is that the filename parameter of execfile is the file name, while the exec parameter is a string. |
| Filter (function, iterable) |
Construct a sequence, equivalent to [item for item in iterable if function (item)] 1. function: a function with a return value of True or False, which can be None. 2. Parameter iterable: sequence or iteratable object |
| Getattr (object, name [, defalut]) |
Obtains the attributes of a class. |
| Globals () |
Returns a dictionary describing the current global symbol table. |
| Hasattr (object, name) |
Determines whether an object contains a feature named name. |
| Hash (object) |
If the object is of the hash table type, the hash value of the object is returned. |
| Id (object) |
Unique Identifier of the returned object (memory identifier) |
| Isinstance (object, classinfo) |
Judge whether the object is a class instance |
| Issubclass (class, classinfo) |
Determine whether it is a subclass |
| Len (s) |
Returns the length of the set. |
| Locals () |
Returns the current variable list. |
| Map (function, iterable ,...) |
Traverse each element and perform function operations |
| Memoryview (obj) |
Returns an object of the memory image type. |
| Next (iterator [, default]) |
Similar to iterator. next () |
| Object () |
Base Class |
| Property ([fget [, fset [, fdel [, doc]) |
The packaging class for Attribute access. After setting, you can access setter and getter through c. x = value. |
| Reduce (function, iterable [, initializer]) |
The merge operation starts with the first two parameters, then the first two results are merged with the third, and so on. |
| Reload (module) |
Reload the module |
| Setattr (object, name, value) |
Set attribute values |
| Repr (object) |
Change an object to a printable format |
| Slice () |
|
| Staticmethod |
Declares a static method. It is an annotation. |
| Super (type [, object-or-type]) |
Reference parent class |
| Type (object) |
Returns the type of the object. |
| Vars ([object]) |
Returns the variable of the object. If no parameter exists, it is similar to the dict () method. |
| Bytearray ([source [, encoding [, errors]) |
Returns a byte array. 1. If source is an integer, an initialized array with the source length is returned; 2. If source is a string, the string is converted to a byte sequence based on the specified encoding; 3. If source is an iteration type, the element must be an integer in [0,255; 4. If source is an object consistent with the buffer Interface, this object can also be used to initialize bytearray. |
| Zip ([iterable,...]) |
Equals to the zipper, that is, the elements in the two lists are arranged one by one. |