https://www.cnblogs.com/Eva-J/articles/7228075.html
http://www.cnblogs.com/Eva-J/articles/7291842.html
1 from collections import namedtuple 2 # Point=namedtuple('point',['x','y']) 3 # p1=Point(1,2) 4 # print(p1) 5 # 6 # Card=namedtuple("扑克牌",['suits','number']) 7 # c1=Card("黑桃",3) 8 # print(c1) 9 #10 # Circle=namedtuple('圆',['x','y','r'])11 # c11=Circle(1,2,5)12 # print(c11)13 # print(type(c11))14 class 圆:15 def __init__(self,x,y,r):16 self.x=x17 self.y=y18 self.r=r19 # def __str__(self):20 # return21 c22=圆(1,2,3)22 print(c22)