Why is python telling me “TypeError: pow expected 2 arguments, got 3” despite it working in IDLE (sometimes it tells me that in IDLE as well)? im simply doing pow(a,b,c). my program is very short and i do not change the definition of pow at any time since i need to use it for some exponentiation.
NOTE: This is the pow from __builtin__, not Math
Built-in
powtakes two or three arguments. If you dofrom math import *then it is replaced by math’spow, which takes only two arguments. My recommendation is to doimport math, or explicitly list functions you use in import list. Similar issue happens withopenvs.os.open.