This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/11391] gdb.Value does not support truth testing
- From: "tromey at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 20 Aug 2010 21:26:14 -0000
- Subject: [Bug python/11391] gdb.Value does not support truth testing
- References: <20100317022646.11391.chrisj@rtems.org>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From tromey at redhat dot com 2010-08-20 21:26 -------
You will probably want to use "is not None" here, because gdb.Value
already implements coercion to boolean, and it uses a value-based approach.
E.g., a NULL pointer or the integer 0 reports as False.
However, we currently throw an error for all other Values.
This seems unnecessarily strict to me, and I think I will change it to
just return True.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at sourceware dot|tromey at redhat dot com
|org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2010-08-20 21:26:14
date| |
http://sourceware.org/bugzilla/show_bug.cgi?id=11391
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.