Permalink
Browse files

Minor cleanups in exception. Tests still don't pass.

  • Loading branch information...
1 parent 59c39f3 commit 899356f8a71eed879738c47932f5a84535d1ea9f @lucian1900 committed Aug 16, 2011
Showing with 7 additions and 6 deletions.
  1. +6 −5 objects/src/exception.winxed
  2. +1 −1 objects/t/exception.t
@@ -1,17 +1,18 @@
namespace Python {
function exception(type, object) {
- var i = type.__new__(type, 'BaseException', [object]);
-
- i.__new__ = function(cls) {
+ var f = type.__new__;
+ var t = f(type, 'BaseException', [object]);
+
+ t.__new__ = function(cls) {
var n = new Python.instance;
n.__class__ = cls;
n.__value__ = new 'Exception';
return n;
};
-
- return i;
+
+ return t;
}
}
View
@@ -14,7 +14,7 @@ function excls() {
class exception {
function init() {
- var e = excls();
+ excls();
}
function throw() {

0 comments on commit 899356f

Please sign in to comment.