[Tutor] constructors

Daniel Coughlin kauphlyn@speakeasy.org
Tue, 13 Mar 2001 20:46:42 -0800 (PST)



On Wed, 14 Mar 2001, Margaret Brierton wrote:

> Hi I'm another new one to python.
> 
> I seem to be having a problem with class constructors.  My program is
> tiny and consists of the following code:
> 
> #! /usr/bin/env python
> 
> class ConnectInfo:
>         def _init_(self, accname):
             ^^    ^^
the  __init__ method takes two underscores in front and in back. it should work
then.