summaryrefslogtreecommitdiff
path: root/pyasn1
diff options
context:
space:
mode:
authorelie <elie>2014-06-15 07:54:52 +0000
committerelie <elie>2014-06-15 07:54:52 +0000
commit87cb54cf65768c1874cdceeb539ec07a336519da (patch)
treede36f598420abe6d9b6158276a7756589932dc98 /pyasn1
parent599c9614614b48a45b6d51d9f7288c44b791b5c2 (diff)
downloadpyasn1-87cb54cf65768c1874cdceeb539ec07a336519da.tar.gz
__trunc__ is only available since python 2.6
Diffstat (limited to 'pyasn1')
-rw-r--r--pyasn1/type/univ.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py
index 8638ad2..7101da4 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -76,7 +76,7 @@ class Integer(base.AbstractSimpleAsn1Item):
return r
def __floor__(self): return math.floor(self._value)
def __ceil__(self): return math.ceil(self._value)
- if sys.version_info[0:2] > (2, 4):
+ if sys.version_info[0:2] > (2, 5):
def __trunc__(self): return self.clone(math.trunc(self._value))
def __lt__(self, value): return self._value < value
@@ -667,7 +667,7 @@ class Real(base.AbstractSimpleAsn1Item):
return r
def __floor__(self): return self.clone(math.floor(float(self)))
def __ceil__(self): return self.clone(math.ceil(float(self)))
- if sys.version_info[0:2] > (2, 4):
+ if sys.version_info[0:2] > (2, 5):
def __trunc__(self): return self.clone(math.trunc(float(self)))
def __lt__(self, value): return float(self) < value