python – 问题子类化内置类型

python – 问题子类化内置类型

# Python 3class Point(tuple): def __init__(self, x, y): super().__init__((x, y))Point(2, 3) 会导致 TypeError: tuple() takes at most 1 argument (2 given) 为什么?我该怎么做呢? 元组是一个不可变类型.在__init__被调用