From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8766 invoked by alias); 21 Sep 2009 15:10:02 -0000 Received: (qmail 8749 invoked by uid 48); 21 Sep 2009 15:10:02 -0000 Date: Mon, 21 Sep 2009 15:10:00 -0000 From: "jason dot orendorff at gmail dot com" To: gdb-prs@sourceware.org Message-ID: <20090921151001.10680.jason.orendorff@gmail.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug python/10680] New: Python extension functions do not mix with && or ||: 'Expression of type other than "Function returning ..." used as function' X-Bugzilla-Reason: CC Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org X-SW-Source: 2009-q3/txt/msg00288.txt.bz2 import gdb class Yes(gdb.Function): """ Always returns true. """ def __init__(self): gdb.Function.__init__(self, "yes") def invoke(self): return True Yes() (gdb) python import test (gdb) p $yes() $7 = true (gdb) p $yes() || $yes() Expression of type other than "Function returning ..." used as function (gdb) p $yes() && $yes() Expression of type other than "Function returning ..." used as function (gdb) p $yes() ^ $yes() $8 = false (gdb) p $yes() == $yes() $9 = true (gdb) p $yes() and $yes() Expression of type other than "Function returning ..." used as function (gdb) p $yes() & $yes() $10 = true (gdb) p $yes() ? $yes() : $yes() $11 = true -- Summary: Python extension functions do not mix with && or ||: 'Expression of type other than "Function returning ..." used as function' Product: gdb Version: archer Status: UNCONFIRMED Severity: normal Priority: P2 Component: python AssignedTo: unassigned at sourceware dot org ReportedBy: jason dot orendorff at gmail dot com CC: gdb-prs at sourceware dot org http://sourceware.org/bugzilla/show_bug.cgi?id=10680 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.