Why tarfile.TarFile.gzopen is not in the online documentation?

Lars Gustäbel lars at gustaebel.de
Fri Feb 26 04:36:28 EST 2010


On Fri, Feb 26, 2010 at 09:28:04AM +0100, Baptiste Lepilleur wrote:
> 2010/2/24 Lars Gustäbel <lars at gustaebel.de>
> 
> > On Wed, Feb 24, 2010 at 09:37:19AM +0100, Baptiste Lepilleur wrote:
> > > I stumbled uppon this and find it somewhat odd: some class methods of
> > > TarFile and TarInfo do not appears in either the online documentation or
> > > search while they have a doc string:
> > >
> > But to answer your question: Yes, this is intentional. The TarFile class
> > has three classmethods taropen(), gzopen(), and bz2open() each for a
> > specific compression method. These three are used internally by the
> > TarFile.open() classmethod and are not intended to be called directly. The
> > TarFile.open() method is the one that is publicly documented and supposed
> > to be used. It decides which of the three methods to use based on the mode
> > argument and does many more other high-level things as well.
> >
> 
> I think it would be best to annotate the help string to let people know of
> the facts it is not intended for public usage (or restriction that apply,
> e.g. only for subclassing as you hinted in another post).

Well, then please take the time and open an issue at bugs.python.org, so
that this won't get lost. I will then see what I can do.

-- 
Lars Gustäbel
lars at gustaebel.de

Linux is like a wigwam - no Gates, no Windows, Apache inside.



More information about the Python-list mailing list