def __init__(self) --> TypeError: Not a sequence?

Alex Martelli aleax at aleax.it
Thu Jan 24 04:27:12 EST 2002


"Ixokai" <ixokai at directvinternet.com> wrote in message
news:3c4fcdd1$1_1 at nopics.sjc...
> I'm confused :)
>
> Stripped down code w/ Python2.2:
>
> class _ObjectStore(object):
>     def __init__(self):
>         self.blah = basic-initialization-for-everything
>
> class _SpecificThingyStore(_ObjectStore):
>     def __init__(self):
>         super(_SpecificThingStore, self).__init__()

There's a typo here -- or in the class name (Thing or Thingy?).

>         self.blah2 = specific-initialiation-for-everything
>
> Then, at import, I receive: "TypeError: Not a sequence" at each of the
> __init__ lines. I am baffled. :) What am I not understanding here? :)

The following code runs without a hitch with Python 2.2:


class _ObjectStore(object):
    def __init__(self):
        self.blah = 23

class _SpecificThingyStore(_ObjectStore):
    def __init__(self):
        super(_SpecificThingyStore, self).__init__()
        self.blah2 = 45

a = _SpecificThingyStore()


so I wonder if you have correctly reproduced your problem in this
toy-sized example?


Alex






More information about the Python-list mailing list