From: thomas at xs4all.nl (Thomas Wouters)
Date: Thu, 27 May 1999 12:50:42 +0200
Subject: Type Error when running Tkinter tutorial's hello2.py example
In-Reply-To: <7ij6m3$djt$1@nnrp1.deja.com>; from tlng@phileo.com.my on Thu, May 27, 1999 at 10:27:16AM +0000
References: <7ij6m3$djt$1@nnrp1.deja.com>
Message-ID: <19990527125042.M29147@xs4all.nl>
X-UID: 1761                                                

On Thu, May 27, 1999 at 10:27:16AM +0000, tlng at phileo.com.my wrote:


> Hi! I going through the draft Tkinter tutorial from Pythonware.com, and
> I'm trying to run its hello2.py example program:-

> class App:
>     def _init_(self, master):

You need 
      def __init__(self, master):

Double underscores ('underbars') on each side of 'init'. This goes for all
the magically-called functions, by the way.

>   File "F:\PALRES~1\PALDIR~1\DEVELO~1\test.py", line 19, in ?
>     app = App(root)
> TypeError: this constructor takes no arguments

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!




