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

Ixokai ixokai at directvinternet.com
Thu Jan 24 06:33:07 EST 2002


    Yes, everything was reproduced accurately--except for one important
fact. The python22.dll that the system is using was custom-built from
release22-maint, to get around bug #498915 which was preventing an extension
I need from compiling.
    I had forgotten at this point I was running off of it since all my other
code was working properly, and so just assumed I was doing something wrong
with the new-style objects and super()s that I haven't worked with before.
Just tried it with the shipped python22.dll and confirmed that it, of
course, worked properly.

    Oops. :) Going to do grab another CVS update and see if whatever the
heck was causing this is fixed or not.

Thanks Jason, Duncan and Alex, for the help :)

--Stephen

"Alex Martelli" <aleax at aleax.it> wrote in message
news:a2ok1e$3kn$1 at serv1.iunet.it...
> "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