public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug python/10680] New: Python extension functions do not mix with && or ||: 'Expression of type other than "Function returning ..." used as function'
@ 2009-09-21 15:10 jason dot orendorff at gmail dot com
  2009-09-21 18:33 ` [Bug python/10680] " tromey at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jason dot orendorff at gmail dot com @ 2009-09-21 15:10 UTC (permalink / raw)
  To: gdb-prs

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-22 17:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-21 15:10 [Bug python/10680] New: Python extension functions do not mix with && or ||: 'Expression of type other than "Function returning ..." used as function' jason dot orendorff at gmail dot com
2009-09-21 18:33 ` [Bug python/10680] " tromey at redhat dot com
2009-09-21 20:26 ` tromey at redhat dot com
2009-09-22 17:39 ` cvs-commit at gcc dot gnu dot org
2009-09-22 17:40 ` cvs-commit at gcc dot gnu dot org
2009-09-22 17:40 ` tromey at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).