[Tutor] problem creating a subclass

Christopher Spears cspears2002 at yahoo.com
Sun Feb 29 16:28:45 EST 2004


I am creating a new class based on UserList called
UList.  Here is the code:

import UserList

class UList(UserList.UserList):
    def __init__(self, initlist=None):
        UserList.UserList.__init__(self,
initlist=None)

When I tested the class, the following happened:

>>> import UList
>>> list = [1,2,3]
>>> a = UList.UList(list)
>>> a
[]

What gives?
-Chris

=====
"I'm the last person to pretend that I'm a radio.  I'd rather go out and be a color television set."
-David Bowie

"Who dares wins"
-British military motto

"The freak is the norm." - "The Infernal Desire Machines of Dr. Hoffman" by Angela Carter



More information about the Tutor mailing list