Opened 12 years ago

Closed 12 years ago

#4497 closed Bugs (fixed)

division operator problem

Reported by: trigves@… Owned by: Dave Abrahams
Milestone: Boost 1.44.0 Component: python USE GITHUB
Version: Boost 1.42.0 Severity: Problem
Keywords: __div__ __truediv__ division nb_divide Cc:

Description

When trying to implement division operator for custom class python doesn't recognize it. It is because boost::python use div which was removed (or deprecated?) in python 3. The fix is to use truediv. I'm attaching the patch

Attachments (1)

truediv.patch (999 bytes ) - added by trigves@… 12 years ago.

Download all attachments as: .zip

Change History (3)

by trigves@…, 12 years ago

Attachment: truediv.patch added

comment:1 by Ralf W. Grosse-Kunstleve, 12 years ago

Checked in as boost trunk svn revision 65055. Tested with Python 2.3 through 2.7. Caveat: I didn't test with Python 3.

comment:2 by Ralf W. Grosse-Kunstleve, 12 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.