Skip to content

Commit

Permalink
Corrected 2 references to int-based versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Dec 23, 2016
1 parent c1138c2 commit 5edba85
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/common/org/Python.java
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ public static org.python.types.Complex complex(org.python.Object real, org.pytho
try {
imag_val = (org.python.types.Float)imag_val.__add__(Python.float_cast(imag == null ? new org.python.types.Float(0) : imag));
} catch (org.python.exceptions.TypeError e) {
if (org.Python.VERSION < 30404) {
if (org.Python.VERSION < 0x03040400) {
throw new org.python.exceptions.TypeError(
"complex() argument must be a string or a number, not '" + imag.typeName() + "'"
);
Expand Down Expand Up @@ -1012,7 +1012,7 @@ public static org.python.types.Int int_cast(org.python.Object x, org.python.Obje
try {
return (org.python.types.Int) x.__int__();
} catch (org.python.exceptions.AttributeError ae) {
if (org.Python.VERSION < 30404) {
if (org.Python.VERSION < 0x03040400) {
throw new org.python.exceptions.TypeError(
"int() argument must be a string or a number, not '" + x.typeName() + "'"
);
Expand Down Expand Up @@ -1424,7 +1424,7 @@ public static org.python.Object pow(org.python.Object x, org.python.Object y, or
throw new org.python.exceptions.TypeError("pow() 3rd argument not allowed unless all arguments are integers");
}
if (z != null && ((org.python.types.Int) y).value < 0) {
if (org.Python.VERSION < 30500) {
if (org.Python.VERSION < 0x03050000) {
throw new org.python.exceptions.TypeError("pow() 2nd argument cannot be negative when 3rd argument specified");
} else {
throw new org.python.exceptions.ValueError("pow() 2nd argument cannot be negative when 3rd argument specified");
Expand Down

0 comments on commit 5edba85

Please sign in to comment.