擅长:python、mysql、java
<pre><code>class Coord(tuple):
def __init__(self, points):
self.x, self.y = points
class Point:
def __init__(self, *points):
self.coord = Coord(points)
point = Point(1, 2)
print(point.coord)
print(point.coord.x)
print(point.coord.y)
</code></pre>