命令行上没有输出。同样,该变量input也无法设置。
我试着从类中删除变量,结果相同。
class test:
input = ""
def __init__(this, input):
this.input = input
def output(this):
print(this.input)
obj = test("hallo")
obj.output
Run Code Online (Sandbox Code Playgroud)
我希望输出是hallo。
| 归档时间: |
|
| 查看次数: |
38 次 |
| 最近记录: |