From: Donal K. Fellows on
On 24 Jan, 11:00, Georgios Petasis <peta...(a)iit.demokritos.gr> wrote:
> Not an important problem, but I observe the following when an error occurs:
[...]
> These are widgets, and if an error is cause in another widget, objects
> are destroyed through Tk events. But since an object exists to call the
> destructor, this means that the constructor has ran, isn't it so?

If the class was mixed into an instance, it would not have the
constructor called. If you are doing something complex with
inheritance and not using [next] in constructors somewhere, it is
possible for a constructor to get missed. (Unlike some languages, the
calling of [next] in the constructor is optional. In part, that's
because "constructors" don't actually make the object itself.) That's
not due to an inheritance error per se, but does indicate that
something you've been doing has gone wrong.

It might be easier to rework the code so that it doesn't rely on the
variable existing; [info exists] is now a very cheap operation.

Donal.