diff options
author | Marion <marion.zepf@gmail.com> | 2013-08-12 15:14:59 (GMT) |
---|---|---|
committer | Marion <marion.zepf@gmail.com> | 2013-08-12 15:14:59 (GMT) |
commit | d4477428d6d6574479ea81b729240c3fa47153e7 (patch) | |
tree | 2e7d9227cc7afd0b2267c7592b874764cc881263 | |
parent | 6edade53f3b0bc23adfd215a67770aec4a726d62 (diff) |
remove unused primitive methods in tabasics
-rw-r--r-- | TurtleArt/tabasics.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/TurtleArt/tabasics.py b/TurtleArt/tabasics.py index 7a1d957..715ba0c 100644 --- a/TurtleArt/tabasics.py +++ b/TurtleArt/tabasics.py @@ -1300,51 +1300,6 @@ variable')) except TypeError: raise logoerror("#notanumber") - def _prim_equal(self, x, y): - ''' Numeric and logical equal ''' - if isinstance(x, list) and isinstance(y, list): - for i in range(len(x)): - if x[i] != y[i]: - return False - return True - try: - return float(x) == float(y) - except ValueError: - typex, typey = False, False - if strtype(x): - typex = True - if strtype(y): - typey = True - if typex and typey: - return x == y - try: - return self._string_to_num(x) == self._string_to_num(y) - except TypeError: - raise logoerror("#syntaxerror") - - def _prim_less(self, x, y): - ''' Compare numbers and strings ''' - if isinstance(x, list) or isinstance(y, list): - raise logoerror("#syntaxerror") - try: - return float(x) < float(y) - except ValueError: - typex, typey = False, False - if strtype(x): - typex = True - if strtype(y): - typey = True - if typex and typey: - return x < y - try: - return self._string_to_num(x) < self._string_to_num(y) - except TypeError: - raise logoerror("#notanumber") - - def _prim_more(self, x, y): - ''' Compare numbers and strings ''' - return self._prim_less(y, x) - def _prim_plus(self, x, y): ''' Add numbers, concat strings ''' if isinstance(x, Color): |