This is the mail archive of the mailing list for the Archer project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [python] Make gdb.search_memory accept keyword arguments.

>> The memory searching stuff needs documentation.  I intend to be a nag
>> about this from now on :-)

Thiago> I added documentation for memory searching. Or do you mean updating the
Thiago> documentation for the keyword syntax?

Actually I was confused and did not realize that the memory searching
API had docs.  Sorry about that.

Thiago> I was planning to add this to the beginning of the "Python API" section,
Thiago> WDYT?

Thiago> +You can get quick online help for @value{GDBN}'s Python API by issuing
Thiago> +the command @kbd{python help (gdb)}.  Functions and methods which have
Thiago> +two or more optional arguments allow them to be specified using keyword
Thiago> +syntax.  This allows passing some optional arguments while skipping
Thiago> +others.  Example: @code{gdb.some_function ('foo', bar = 1, baz = 2)}.

This looks nice to me.

The first sentence and the remaining sentences don't seem to be
directly related, though.  Perhaps this ought to be 2 paragraphs.

Thiago> Perhaps this means I should add keyword arguments to all functions (or
Thiago> at least, the ones with at least one optional argument) instead of just
Thiago> for functions with two or more optional arguments?

We should follow whatever the typical Python practice is.  Which I
don't know :-)

I do think the keywords ought to be documented in the manual.
They are part of the API.  This also means we'll have to be careful
about naming them, just as we are with function and class names,
because changing them will break things.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]