Skip to content

Commit

Permalink
division where the denominator is a bigint, should respect the Sk.pyt…
Browse files Browse the repository at this point in the history
…hon3 config variable
  • Loading branch information
bnmnetp committed Sep 29, 2013
1 parent e182d2c commit 7a2bcc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/number.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ Sk.builtin.nmber.prototype.nb$divide = function(other)
else
return new Sk.builtin.nmber(-Infinity, Sk.builtin.nmber.float$);

if (this.skType === Sk.builtin.nmber.float$) { // float / long --> float
if (this.skType === Sk.builtin.nmber.float$ || Sk.python3) { // float / long --> float
result = new Sk.builtin.nmber(this.v / parseFloat(other.str$(10, true)), Sk.builtin.nmber.float$);
} else { // int - long --> long
var thisAsLong = new Sk.builtin.lng(this.v);
Expand Down Expand Up @@ -737,4 +737,4 @@ Sk.builtin.nmber.prototype.str$ = function(base, sign)
return tmp;
};

goog.exportSymbol("Sk.builtin.nmber", Sk.builtin.nmber);
goog.exportSymbol("Sk.builtin.nmber", Sk.builtin.nmber);

0 comments on commit 7a2bcc7

Please sign in to comment.