From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27830 invoked by alias); 17 Aug 2011 21:15:37 -0000 Received: (qmail 27813 invoked by uid 22791); 17 Aug 2011 21:15:36 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausc60ps301.us.dell.com (HELO ausc60ps301.us.dell.com) (143.166.148.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Aug 2011 21:15:23 +0000 X-Loopcount0: from 10.175.216.249 From: To: , CC: , Date: Wed, 17 Aug 2011 21:15:00 -0000 Subject: RE: Some Python ideas, looking for feedback Message-ID: <09787EF419216C41A903FD14EE5506DD0151F6C8A1@AUSX7MCPC103.AMER.DELL.COM> References: <09787EF419216C41A903FD14EE5506DD0151D583A2@AUSX7MCPC103.AMER.DELL.COM> <201108161345.33448.andre.poenitz@nokia.com> <09787EF419216C41A903FD14EE5506DD0151D585D2@AUSX7MCPC103.AMER.DELL.COM> <20110817193710.59945561@ado-gentoo> <20110817201316.64fc14e5@ado-gentoo> In-Reply-To: Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 2011-08/txt/msg00081.txt.bz2 >> On Wed, 17 Aug 2011 19:37:10 +0100 >> Andrew Oakley wrote: >>> What you are looking for is (for some reason) stored in bitpos. =A0I=20 >>> can't actually find any documentation for this :(. >> >> Perhaps we should fix that: >> >> Document gdb.Value field attribute "bitpos" for enums. > >I don't suppose we can avoid exposing this internal C wart to Python, and = expose it some other way... ? Clearly we could. For example, Andr=E9 suggested using the int() function = on the field object, by analogy to what int() does to an enum-valued Value = object. That certainly would make sense and it would be a pretty natural P= ythonic thing to do. paul