My own list object

Emile van Sebille emile at fenx.com
Tue Feb 5 13:51:42 EST 2002


"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

---------




More information about the Python-list mailing list