Need help with syntax on inheritance.

jordan.nick at gmail.com jordan.nick at gmail.com
Wed Oct 4 00:02:04 EDT 2006


SpreadTooThin wrote:
> If you are deriving a new class from another class,
> that you must (I assume) know the initializer of the other class.
>
> So in myClass
>
> import array
> class myClass(arrary.array):
>    def __init__(self, now here I need to put array's constructor
> parameters..., then mine):
>       array.array.__init__(self, typecode[, initializer])
>       self.mine = mine
>
> So I'm confused...
> array has a typecode parameter and an optional initiializer...
> So could you help me with the class construction here please?

Lookup *args and **kargs in the python reference manual.




More information about the Python-list mailing list