summaryrefslogtreecommitdiff
path: root/scalarfloat.py
diff options
context:
space:
mode:
Diffstat (limited to 'scalarfloat.py')
-rw-r--r--scalarfloat.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/scalarfloat.py b/scalarfloat.py
index 4608094..7f7d26d 100644
--- a/scalarfloat.py
+++ b/scalarfloat.py
@@ -2,14 +2,14 @@
from __future__ import print_function, absolute_import, division, unicode_literals
+import sys
+from .compat import no_limit_int # NOQA
+
if False: # MYPY
from typing import Text, Any, Dict, List # NOQA
__all__ = ["ScalarFloat", "ExponentialFloat", "ExponentialCapsFloat"]
-import sys
-from .compat import no_limit_int # NOQA
-
class ScalarFloat(float):
def __new__(cls, *args, **kw):
@@ -74,11 +74,13 @@ class ScalarFloat(float):
self, self._width, self._prec, self._m_sign, self._m_lead0, # type: ignore
self._exp, self._e_width, self._e_sign), file=out) # type: ignore
+
class ExponentialFloat(ScalarFloat):
def __new__(cls, value, width=None, underscore=None):
# type: (Any, Any, Any) -> Any
return ScalarFloat.__new__(cls, value, width=width, underscore=underscore)
+
class ExponentialCapsFloat(ScalarFloat):
def __new__(cls, value, width=None, underscore=None):
# type: (Any, Any, Any) -> Any