This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/20624] New: gdb.Value doesn't support Python floordiv operator, //


https://sourceware.org/bugzilla/show_bug.cgi?id=20624

            Bug ID: 20624
           Summary: gdb.Value doesn't support Python floordiv operator, //
           Product: gdb
           Version: 7.10.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: jwakely.gcc at gmail dot com
  Target Milestone: ---

Due to https://www.python.org/dev/peps/pep-0238/ which changed the meaning of /
in Python 3 I tried to change the libstdc++ pretty printers to use // instead,
to get integer division, but got:

Python Exception <class 'TypeError'> unsupported operand type(s) for //:
'gdb.Value' and 'int':

I can cast the gdb.Value to int but it would be nice if it supported the //
operator.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]