Compare the two objects x and y and return an integer according to the outcome. The return
value is negative if x < y, zero if x == y and strictly positive if x > y.
X 小于 X 输出负(-1, X 等于 Y 输出零(0, X 大于 Y 输出正(1
用法:
12
compile(source , filename , mode [, flags [, dont_inherit]]
Compile the source into a code or AST object. Code objects can be executed by an exec
statement or evaluated by a call to eval(. source can either be a string or an AST object. Refer to the
ast module documentation for information on how to work with AST objects.
13
complex([real [, imag ]]
Create a complex number with the value real + imag *j or convert a string or number to a
complex number. If the first parameter is a string, it will be interpreted as a complex number and
the function must be called without a second parameter. The second parameter can never be a
string. Each argument may be any numeric type (including complex. If imag is omitted, it defaults
to zero and the function serves as a numeric conversion function like int(, long( and float(. If both
arguments are omitted, returns 0j.
14
delattr(object , name
This is a relative of setattr(. The arguments are an object and a string. The string must be the
name of one of the object’s attributes. The function deletes the named attribute, provided the object
allows it. For example, delattr(x, 'foobar' is equivalent to del x.foobar.
15、字典