Skip to content

Commit

Permalink
Implemented NotImplementedType and NotImplemented
Browse files Browse the repository at this point in the history
git-svn-id: https://pyjamas.svn.sourceforge.net/svnroot/pyjamas/trunk@2005 7a2bd370-bda8-463c-979e-2900ccfb811e
  • Loading branch information
keesbos committed Oct 13, 2009
1 parent fd091c2 commit 701b7a7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,6 +1,8 @@
Changes made to Pyjamas since 0.6
---------------------------------

* Implemented NotImplementedType and NotImplemented

* Implemented an int type and a long type

* Add support for xrange and propper range (range was in fact an xrange)
Expand Down
13 changes: 10 additions & 3 deletions pyjs/src/pyjs/builtin/pyjslib.py
Expand Up @@ -31,8 +31,8 @@
break;
}
}
$max_int = 2147483647;
$min_int = -2147483648;
$max_int = 0x7fffffff;
$min_int = -0x80000000;
""")

class object:
Expand Down Expand Up @@ -967,7 +967,6 @@ def init():
JS("""
pyjslib.abs = Math.abs;
""")
# end of function init()

class Class:
def __init__(self, name):
Expand Down Expand Up @@ -2983,6 +2982,14 @@ def float_int(value, radix=None):

"""@CONSTANT_DECLARATION@"""

class NotImplementedType(object):
def __repr__(self):
return "<type 'NotImplementedType'>"
def __str__(self):
self.__repr__()
def toString(self):
self.__repr__()
NotImplemened = NotImplementedType()

class List:
@compiler.noSourceTracking
Expand Down
2 changes: 2 additions & 0 deletions pyjs/src/pyjs/translator.py
Expand Up @@ -281,7 +281,9 @@
"KeyError",
"LookupError",
"NameError",
"NotImplemented", # is in fact an instance
"NotImplementedError",
"NotImplementedType",
"RuntimeError",
"StandardError",
"StopIteration",
Expand Down

0 comments on commit 701b7a7

Please sign in to comment.