如何使用 pyinstaller将pyw文件转换为exe,如果不可能,我该如何使用 py2exe 执行此操作?
我正在使用python 3!
所以我刚开始在python 3 中学习面向对象的编程,我遇到了“ __add__”方法,我不明白“其他”是什么以及它做什么。我试图在互联网上寻找答案,但一无所获,这是我的代码示例:
import math
class MyClass:
def __init__(self, x, y):
self.x = x
self.y = y
def __add__(self, other):
f = self.x + other.x
e = self.y + other.y
Run Code Online (Sandbox Code Playgroud)