Wrong error type returned by pow function
djmgit opened this issue · 2 comments
djmgit commented
Expected Behavior
Pow function should return ValueError when there are 3 arguments and the second argument is
negative.
Current Behavior
Batavia is returning TypeError for the above mentioned case. This is also causing the tests in tests/builts/test_pow to fail.
Steps to reproduce
- Execite the following code snippet using Batavia
Batavia returns TypeError:
print(pow(1, -1, 1)
however python returns ValueErrorTraceback (most recent call last): File "/home/deep/batavia/test3.py", line 1, in <module> TypeError: pow() 2nd argument cannot be negative when 3rd argument specified
Traceback (most recent call last): File "../test3.py", line 1, in <module> print(pow(2, -4, 1)) ValueError: pow() 2nd argument cannot be negative when 3rd argument specified
Your Environment
-
Python Version (list the specific version number)
3.5.2 -
Operating System and Version (select from the following and list the specific version number; if your OS is not listed, list that as well)
- OSX
- Linux
- Windows
- Ubuntu
djmgit commented
I am working on this.