Dynamic class construction?

David C. Ullrich ullrich at math.okstate.edu
Mon Jan 31 14:58:58 EST 2000


Adrian Eyre wrote:

> >> There's already a module which does this...
>
> > I sorta thought there might be a module that does this, but I
> > couldn't find it.
>
> You didn't look very hard :)

    Actually the error I made was assuming that when I did
a full install of 1.5.2 the docs that appeared would be the
same as the official docs. This was stupid, since I've seen
before that it's not so. But I _did_ look as hard as appropriate,
in what was _supposed_ to be a right place.

    Evidently the contents of www.python.org/doc/current
are subject to change even when python hasn't changed?
Makes perfect sense, but it raises the question of whether
there's a way to tell whether one's local copy of the
docs is complete and current. Noting that it's 1.5.2
isn't enough.

>
> http://www.python.org/doc/current/lib/module-new.html
>
> > Um, I still can't find it. It appears to be a builtin module -
> > new.__doc__ says
>
> > '     Functions to create new objects used by the interpreter.
> >
> > You need to know a great deal about the interpreter to use this!',
> > which is helpful,
>
> I thought so :)
>
> > It's not in the "module index", I don't find any interesting
> > files contaning the text "classobj", etc.)
>
> What? This one?
>
> http://www.python.org/doc/current/modindex.html
>
> Ah. Be aware this module was only introduced in 1.5.2 IIRC.

    No, I wasn't referring to that modindex.html, I was referring
to the modindex.html that came when I installed 1.5.2.
You know, the modindex.html that (i) comes with "Release 1.5.2"
of the "Python Library Reference" (the quotes indicating cut&paste
quotes from the files) and (ii) skips from netrc to nnttplib.
_That_ one...

    It's obviously a good thing for the docs to be revised more
often than the program itself. But then the docs should have
separate version numbers. (If the docs _do_ have a separate
version number I've never found it, all I've ever seen is that
"1.5.2".)

    Hmm, I see it _does_ say "Python 1.5.2 Documentation
(revised)" on the site. Evidently the "revised" is supposed to
be a hint in this direction. But I don't see how a person is
supposed to know whether he already _has_ the "revised"
docs, or whether there's been a revision since the revised
ones he got, or what.

    Thanks.

> --------------------------------------------
> Adrian Eyre <a.eyre at optichrome.com>
> http://www.optichrome.com




More information about the Python-list mailing list