Types
Built-in Types
The following sections describe the standard types that are built into the interpreter.
The principal built-in types are numerics, sequences, mappings, classes, instances and exceptions.
Some collection classes are mutable. The methods that add, subtract, or rearrange their members in place, and don’t return a specific item, never return the collection instance itself but None
.
Some operations are supported by several object types; in particular, practically all objects can be compared, tested for truth value, and converted to a string (with the repr()
function or the slightly different str()
function). The latter function is implicitly used when an object is written by the 登录查看完整内容