From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30638 invoked by alias); 25 Mar 2008 18:37:50 -0000 Received: (qmail 30629 invoked by uid 22791); 25 Mar 2008 18:37:50 -0000 X-Spam-Check-By: sourceware.org Received: from fk-out-0910.google.com (HELO fk-out-0910.google.com) (209.85.128.186) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 25 Mar 2008 18:37:23 +0000 Received: by fk-out-0910.google.com with SMTP id 26so4478344fkx.8 for ; Tue, 25 Mar 2008 11:37:21 -0700 (PDT) Received: by 10.82.177.3 with SMTP id z3mr21882738bue.23.1206470241057; Tue, 25 Mar 2008 11:37:21 -0700 (PDT) Received: by 10.82.162.12 with HTTP; Tue, 25 Mar 2008 11:37:21 -0700 (PDT) Message-ID: <8f2776cb0803251137l2c09d785sb2a6dbd9fb1d93e1@mail.gmail.com> Date: Tue, 25 Mar 2008 18:53:00 -0000 From: "Jim Blandy" To: "Jim Blandy" , "Tom Tromey" , "Thiago Jung Bauermann" , "gdb ml" Subject: Re: repo to work on python scripting support In-Reply-To: <20080325183004.GA20107@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1205538908.6643.138.camel@localhost.localdomain> <1206369478.29533.15.camel@localhost.localdomain> <20080325114520.GA21688@caradoc.them.org> <8f2776cb0803251118o316d261erb340d67bb0580967@mail.gmail.com> <20080325183004.GA20107@caradoc.them.org> X-Google-Sender-Auth: e6b2d6249afedb99 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00224.txt.bz2 On Tue, Mar 25, 2008 at 11:30 AM, Daniel Jacobowitz > Hmm, I've worked with some packages that did similar things using > mandatory docstrings. > > def strcmp (expr1, expr2): > """strcmp: EXPR, EXPR > > Compare expr1 and expr2 as strings.""" > doit > > Dunno if that's wise. Eww. Emacs Lisp distinguishes docstrings from interactive specs. In the example you give here, there's no nice way to break out and allow arbitrary Python for computing the arguments; the 'arbitrary lisp' escape hatch is necessary in Emacs from time to time. With the approach I suggested, it'd be pretty easy to have 'interactive' be either a string or a method, and to have the GDB invocation code do some reflection to decide how to interpret things.