My own list object

MDK mdk at mdk.com
Tue Feb 5 14:28:01 EST 2002


"Emile van Sebille" <emile at fenx.com> wrote in message
news:a3p9uh$19q6me$1 at ID-11957.news.dfncis.de...
>
> "MDK" <mdk at mdk.com> wrote in message
> news:a3p9b6$1a7qtb$1 at ID-98166.news.dfncis.de...
> > >>> class MyList:
> > ...     def __init__(self):
> > ...             self.list=[]
> > ...     def append(self, item):
> > ...             self.list.append(item)
> > ...
> > > >
> > >>> import mylist
> > >>> x = mylist()
> > Traceback (most recent call last):
> >   File "<interactive input>", line 1, in ?
> > TypeError: object of type 'module' is not call
> >
> > Why is this happening?  My list object must be a class in its own,
> > importable file.
>
> s/b
>
> x = mylist.MyList()
>
> --
>
> Emile van Sebille
> emile at fenx.com

Ah, thanks.





More information about the Python-list mailing list