class Card():
def __init__(self, val):
self.val = val
c = Card(1)
d = -c
I expect d to be a Card object and d.val to be -1. How I can do that?
class Card():
def __init__(self, val):
self.val = val
c = Card(1)
d = -c
I expect d to be a Card object and d.val to be -1. How I can do that?