【发布时间】:2011-06-17 04:07:33
【问题描述】:
# Python 3
class Point(tuple):
def __init__(self, x, y):
super().__init__((x, y))
Point(2, 3)
会导致
TypeError: tuple() 最多取 1 论据(给定 2 个)
为什么?我应该怎么做?
【问题讨论】:
标签: python python-3.x subclassing built-in-types