Re: [RFA][patch 1/9] Yet another respin of the patch with initial Python support

Daniel Jacobowitz
2008-07-26T18:30:39Z

On Sat, Jul 26, 2008 at 09:10:18PM +0300, Eli Zaretskii wrote:
> > >> +@value{GDBN} introduces a new Python module, named @code{gdb}. All
> > >> +methods and classes added by @value{GDBN} are placed in this module.
> >
> > Eli> OK, but what does this mean for whoever writes Python extensions for
> > Eli> GDB? While at that, how about explaining why a command FOO is indexed
> > Eli> as gdb.FOO?
> >
> > I thought it would be nice to index them both ways. Do you disagree?
> >
> > Python programmers know what the module stuff means. We don't have to
> > explain that.
>
> Sorry, I disagree.

What would you like explained? I'm a bit confused - as a Python
programmer, albeit novice, what Tom wrote makes sense to me.

> > >> +Find the value of a @value{GDBN} setting.
> >
> > Eli> "find" or "display"? If the former, why the name is "show"?
> >
> > It mimics the CLI command name.
>
> ??? CLI commands that begin with "show" actually display the values.
> This one does not, right?

I suggest "get" parallel to "set", then.

> > >> +Print a string to @value{GDBN}'s paginated standard output stream.
> > >> +Ordinarily your program should not call this function directly; simply
> > >> +print to @code{sys.stdout} as usual.
> >
> > Eli> So why is this command available, and why document it?
> >
> > Completeness. It is visible in the module.
>
> Doesn't sound like a good enough reason to me.

Maybe we should move it to a new module gdb._internal then. Tom, what
do you think?

--
Daniel Jacobowitz
CodeSourcery