From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18158 invoked by alias); 16 Aug 2011 14:45:59 -0000 Received: (qmail 18145 invoked by uid 22791); 16 Aug 2011 14:45:57 -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 ausc60pc101.us.dell.com (HELO ausc60pc101.us.dell.com) (143.166.85.206) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 16 Aug 2011 14:45:39 +0000 X-Loopcount0: from 10.170.28.41 From: To: , Date: Tue, 16 Aug 2011 14:45:00 -0000 Subject: RE: Some Python ideas, looking for feedback Message-ID: <09787EF419216C41A903FD14EE5506DD0151D585D2@AUSX7MCPC103.AMER.DELL.COM> References: <09787EF419216C41A903FD14EE5506DD0151D583A2@AUSX7MCPC103.AMER.DELL.COM> <201108161345.33448.andre.poenitz@nokia.com> In-Reply-To: <201108161345.33448.andre.poenitz@nokia.com> 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/msg00060.txt.bz2 >On Tuesday 16 August 2011 13:03:42 ext Paul_Koning@Dell.com wrote: >> [...] >> And a question: is there a way to get the value corresponding to an enum= type's value name?=20=20 >> The name comes back in the fields() output but I don't see how I would g= et the value. Could that be made a value attribute of the field object? > >int(...) works, or "%d" % ... That works for Value objects, but not for fields of Type. But it looks lik= e an obvious way to make it work for Type (rather than a "value" attribute = as I suggested earlier). paul