class Card(): def __init__(self, val): self.val = val c = Card(1) d = -c
我希望d成为一个Card对象并d.val成为-1.我怎么能这样做?
d
Card
d.val
python
python ×1