Skip to content

Commit

Permalink
Merge pull request skulpt#164 from rixner/master
Browse files Browse the repository at this point in the history
Make Sk.misceval.objectRepr print floats correctly.
  • Loading branch information
rixner committed Sep 24, 2013
2 parents 2cc5723 + 66d8a7c commit b4bf6ea
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/misceval.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ Sk.misceval.objectRepr = function(v)
else if (v.v === -Infinity)
return new Sk.builtin.str('-inf');
else
return new Sk.builtin.str("" + v.v);
return v['$r']();
}
else
return v['$r']();
Expand Down
3 changes: 3 additions & 0 deletions test/run/t513.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

x = [1.0, 2.0]
print x
1 change: 1 addition & 0 deletions test/run/t513.py.real
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[1.0, 2.0]

0 comments on commit b4bf6ea

Please sign in to comment.