我有以下课程:
class C3DPoint(object):
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z = z
# Other methods
Run Code Online (Sandbox Code Playgroud)
我想确保如果有人设置v3dpoint.x = <sth>它会在 vale 不是字符串的情况下抛出错误。
如何才能做到这一点?