This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: Function syntax (Was: [RFC][patch 1/9] initial Python support)


On Thu, May 29, 2008 at 1:29 PM, Tom Tromey <tromey@redhat.com> wrote:
> I suppose my basic proposal is that all functions be derived from
> something like:
>
> class Function:
>    # ARG is a string, already de-quoted and whitespace-stripped.
>    def invoke(self, arg):
>        do something
>
>    def complete(self, text, word):
>        complete the argument
>
> This is basically exactly what we do for commands, only in the
> Function case we could expect invoke to return a value.

IWBN if this also included some help text that was somehow hooked into
help/apropos.  [maybe as fhelp, fapropos, or some such]


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