pypyodbc icon indicating copy to clipboard operation
pypyodbc copied to clipboard

Broken division for Python3

Open waynew opened this issue 10 years ago • 0 comments

In get_type it uses the floating point division operator (//). At least in Python 2.x.

In Python3 // now peforms integer truncation, which totally blew out an operation we were doing. From what I can tell it looks like adding from __future__ import division to the top, and replacing // with / should fix it.

UPDATE: though it might need to be wrapped in an int() - ctypes complained about a TypeError

waynew avatar Mar 31 '14 16:03 waynew