基本上我希望能够做到这样的事情:
a = Integer(1) a += 1 print a
当然,打印第二个结果.我需要创建哪些方法才能在我的Integer类中获得此行为?
免责声明:我不打算将其用于"真实",只是好奇.
python object
object ×1
python ×1