python2.6ããå°å ¥ãããnamedtupleã«ã¤ãã¦ã¡ãã£ããæ¸ãã¦ãããã namedtupleã£ã¦ï¼ namedtupleã¯ååã®éãååä»ãã§ã¢ã¯ã»ã¹ã§ããtupleãè¿ãã >>> from collections import namedtuple >>> p = namedtuple('Point', 'x y') >>> p1 = p(11, 22) >>> p1[0] 11 >>> p1[1] 22 >>> p1.x 11 >>> p1.y 22 >>> p2 = p(x = 33, y = 44) >>> p2[0] 33 >>> p2[1] 44 >>> p2.x 33 >>> p2.y 44 >>> ã¨ã¾ããããªæãã namedtupleé¢æ°ã«ååã¨ãã£ã¼ã«ãã渡ãã¨ååä»ãã§ã¢ã¯ã»ã¹ã§ãããã®ã ä½æãããã®ãè¿ãã ä»çµã¿ å®éã«ã¯nametupleé¢æ°
{{#tags}}- {{label}}
{{/tags}}