From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12242 invoked by alias); 8 Jun 2008 15:24:35 -0000 Received: (qmail 12232 invoked by uid 22791); 8 Jun 2008 15:24:35 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 08 Jun 2008 15:24:17 +0000 Received: from spaceape13.eur.corp.google.com (spaceape13.eur.corp.google.com [172.28.16.147]) by smtp-out.google.com with ESMTP id m58FOE45008715 for ; Sun, 8 Jun 2008 16:24:14 +0100 Received: from rv-out-0506.google.com (rvbg37.prod.google.com [10.140.83.37]) by spaceape13.eur.corp.google.com with ESMTP id m58FOCjj004169 for ; Sun, 8 Jun 2008 16:24:13 +0100 Received: by rv-out-0506.google.com with SMTP id g37so1830879rvb.23 for ; Sun, 08 Jun 2008 08:24:12 -0700 (PDT) Received: by 10.115.76.5 with SMTP id d5mr2278003wal.191.1212938652343; Sun, 08 Jun 2008 08:24:12 -0700 (PDT) Received: by 10.114.254.4 with HTTP; Sun, 8 Jun 2008 08:24:12 -0700 (PDT) Message-ID: Date: Sun, 08 Jun 2008 15:24:00 -0000 From: "Doug Evans" To: tromey@redhat.com Subject: Re: Function syntax (Was: [RFC][patch 1/9] initial Python support) Cc: "Thiago Jung Bauermann" , gdb-patches@sourceware.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080429155212.444237503@br.ibm.com> <20080429155304.288626880@br.ibm.com> <20080528205921.GA2969@caradoc.them.org> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-06/txt/msg00136.txt.bz2 On Thu, May 29, 2008 at 1:29 PM, Tom Tromey 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]