
1 rcmerci 2014-08-16 12:47:39 +08:00 到处找找吧 |
2 1989922yan OP |
3 arbipher 2014-08-16 14:21:33 +08:00 via iPhone 看下namedtuple源代码试试? |
4 vmebeh 2014-08-16 15:13:05 +08:00 via iPhone 这是 Point = namedtuple('Point', ['x', 'y'], verbose=True) 回显的 来自 Lib/collections.py 234行的 _class_template,在348行填好参数打印出来 |
5 ruoyu0088 2014-08-16 16:05:06 +08:00 _tuple is tuple, you can input following code to verify it: from collections import namedtuple Point = namedtuple("Point", "x, y", verbose=True) print Point.__new__.func_globals["_tuple"] is tuple |
6 1989922yan OP @ruoyu0088 yep, in the source code, where it write `from builtins import property as _property, tuple as _tuple` |