summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerman M. Bravo <german.mb@deipi.com>2013-08-16 14:22:20 -0500
committerGerman M. Bravo <german.mb@deipi.com>2013-08-16 14:22:20 -0500
commit61f8ecf21a9e55aca7347b4617ba56e396dc347d (patch)
tree2c4c8dbb34f8644b8f4b4fb56885835bc3f11195
parentd6d3430c10054f0157683e16e363ac2d7cbc8dc4 (diff)
downloadpyscss-61f8ecf21a9e55aca7347b4617ba56e396dc347d.tar.gz
Reverted change about raising NotImplemented
-rw-r--r--scss/types.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scss/types.py b/scss/types.py
index 65ef9a8..7b0f4f1 100644
--- a/scss/types.py
+++ b/scss/types.py
@@ -78,7 +78,7 @@ class Value(object):
return self.__div__(other)
def __mul__(self, other):
- raise NotImplementedError("__mul__(%s, %s)" % (self.__class__.__name__, other.__class__.__name__))
+ return NotImplemented
def __pos__(self):
return String("+" + self.render())
@@ -288,7 +288,7 @@ class Number(Value):
def __mul__(self, other):
if not isinstance(other, Number):
- raise NotImplementedError("__mul__(%s, %s)" % (self.__class__.__name__, other.__class__.__name__))
+ return NotImplemented
amount = self.value * other.value
numer = self.unit_numer + other.unit_numer
@@ -298,7 +298,7 @@ class Number(Value):
def __div__(self, other):
if not isinstance(other, Number):
- raise NotImplementedError("__div__(%s, %s)" % (self.__class__.__name__, other.__class__.__name__))
+ return NotImplemented
amount = self.value / other.value
numer = self.unit_numer + other.unit_denom
@@ -319,7 +319,7 @@ class Number(Value):
def _add_sub(self, other, op):
"""Implements both addition and subtraction."""
if not isinstance(other, Number):
- raise NotImplementedError("%s(%s, %s)" % (op.name, self.__class__.__name__, other.__class__.__name__))
+ return NotImplemented
# If either side is unitless, inherit the other side's units. Skip all
# the rest of the conversion math, too.