summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pyasn1/type/univ.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py
index bc0a0f4..2897e64 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -631,6 +631,12 @@ class Real(base.AbstractSimpleAsn1Item):
else:
return str(value)
+ def prettyPrint(self, scope=0):
+ if self.isInfinity():
+ return self.prettyOut(self._value)
+ else:
+ return str(float(self))
+
def isPlusInfinity(self): return self._value == self._plusInf
def isMinusInfinity(self): return self._value == self._minusInf
def isInfinity(self): return self._value in self._inf