From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14678 invoked by alias); 5 Nov 2011 21:04:35 -0000 Received: (qmail 14663 invoked by uid 22791); 5 Nov 2011 21:04:33 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qw0-f41.google.com (HELO mail-qw0-f41.google.com) (209.85.216.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 05 Nov 2011 21:04:19 +0000 Received: by qadc11 with SMTP id c11so3498692qad.0 for ; Sat, 05 Nov 2011 14:04:19 -0700 (PDT) Received: by 10.224.183.15 with SMTP id ce15mr1387364qab.42.1320527058937; Sat, 05 Nov 2011 14:04:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.183.15 with SMTP id ce15mr1387351qab.42.1320527058813; Sat, 05 Nov 2011 14:04:18 -0700 (PDT) Received: by 10.224.6.76 with HTTP; Sat, 5 Nov 2011 14:04:18 -0700 (PDT) In-Reply-To: References: <3A3AF5AE-70E8-43D0-B8CE-DCADFEEF879A@comcast.net> <560557F2-1B8B-4633-8CD6-E63705EEAF0E@comcast.net> <83wrckrcg1.fsf@gnu.org> <37B202A1-DCD5-423E-8E30-55A6F2BE21EF@comcast.net> Date: Sat, 05 Nov 2011 21:04:00 -0000 Message-ID: Subject: Re: [RFA] Re: Python: add field access by name and standard python mapping methods to gdb.Type From: Doug Evans To: Paul Koning Cc: Eli Zaretskii , tromey@redhat.com, gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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: 2011-11/txt/msg00134.txt.bz2 On Sat, Nov 5, 2011 at 7:36 AM, Paul Koning wrote: >> Maybe I'd be happy if gdb.Type (and maybe gdb.Value) were simply more >> rigorous in throwing exceptions for invalid cases. > > I agree. =A0I'll put that together. Sounds great if it's possible. I don't know enough about the C Python API, but when I tried a simple hack to have len(scalar_type) throw an exception "not scalar_type" started throwing exceptions too. :-( See PyObject_IsTrue.