标题:关于实例化对象时的参数问题
取消只看楼主
杨杰2001
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2021-10-12
 问题点数:0 回复次数:0 
关于实例化对象时的参数问题

程序代码:
class TreeNode(object):
 
    def __int__(self, MyAttribute, SonAttribute, FartherValue, Result):
        self.MyAttribute = MyAttribute
        self.SonAttribute = SonAttribute
        self.FartherValue = FartherValue
        self.Result = Result

Node1 = TreeNode(2, 3, 4, 5)

print(Node1.MyAttribute)
print(Node1.SonAttribute)

为什么编译器一直显示实例化对象的时候参数有问题啊,但是我看别人电脑有没有问题 难道是我电脑的问题吗
搜索更多相关主题的帖子: 对象 print Result 参数 实例化 
2021-10-12 16:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-507134-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.743876 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved