AttributeError: 'module' object has no attribute 'div'
python-3.x
Solution
According to the docs, there is a truediv and a floordiv in Python 3. You need to use one of these.
operator.truediv(a, b) operator.__truediv__(a, b) Return a / b where 2/3 is .66 rather than 0. This is also known as “true” division.
operator.floordiv(a, b) operator.__floordiv__(a, b) Return a // b
Problem
I tried to run following program of using python 3.2 , there is error: 'module' object has no attribute 'div' Can anybody tell me what should I do to fix this? i really appreciate it ! ``` import operator ops = {'+':operator.add,'-':operator.sub,'*':operator.mul,'/':operator.div} ``` AttributeError: 'module' object has no attribute 'div