Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion note/python/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namedtuple是在python2.6中开始出现的,在collections模块下面,它扩展
语法是这样的:

collections.namedtuple(typename, filed_names[, verbose])
地一个参数指定新类型的名字,第二个参数是字符串(用空格或者逗号隔开)它构成了这个类型的域. 如果verbose等于True.那么就会打印出类生成信息.
第一个参数指定新类型的名字,第二个参数是字符串(用空格或者逗号隔开)它构成了这个类型的域. 如果verbose等于True.那么就会打印出类生成信息. 

>>> People = namedtuple("People",'age name', True)
class People(tuple):
Expand Down