List对象是“变长对象”。spa
Python中List对象最重要的建立方法为PyList_New,以下Python语句最终会调用到PyList_New:code
test = [1, 2, 3, 4, 5]
// pystate.c PyInterpreterState_New // ceval.c =>_PyEval_EvalFrameDefault (case BUILD_LIST) // listobject.c => PyList_New