【发布时间】:2013-06-11 15:08:02
【问题描述】:
我正在尝试学习如何使用 Traits 制作 GUI。我是面向对象编程的新手,我是 Python 的新手。我在网上找到的大多数示例都没有使用 Hastraits 子类中的任何构造函数。我应该忘记 def init(self, *arg) 构造函数吗?还是我应该强迫自己使用它?
例如,以以下为例: Change property parameter from within class constructor [Python / Traits]
DrSAR 的代码对我来说是所有示例中最简单和优雅的;但它不使用构造函数。我错过了什么吗?
【问题讨论】: