Did I find the right examples for you? yes no

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/h/t/HTSQL-2.3.3/src/htsql/core/domain.py   HTSQL(Download)
 
 
from .util import (maybe, oneof, listof, Clonable, Hashable, Printable,
        TextBuffer, to_literal, urlquote, isfinite)
import re
                             % text.encode('utf-8'))
        # Check if we got a finite number.
        if not isfinite(data):
            raise ValueError("invalid float literal: %s" % data)
        return data
            return None
        # Check that we got a real number.
        assert isfinite(data)
        # Use `repr` to avoid loss of precision.
        return unicode(repr(data))
                             % text.encode('utf-8'))
        # Verify that we got a finite number.
        if not isfinite(data):
            raise ValueError("invalid decimal literal: %s"
                             % text.encode('utf-8'))
            return None
        # Check that we got a real number.
        assert isfinite(data)
        # Produce a decimal representation of the number.
        return unicode(data)

src/h/t/HTSQL-2.3.3/src/htsql/core/cmd/embed.py   HTSQL(Download)
 
 
from ..util import isfinite, to_name
from ..adapter import Adapter, adapt, adapt_many
from ..domain import (UntypedDomain, BooleanDomain, IntegerDomain, FloatDomain,
    def __call__(self):
        if not isfinite(self.data):
            raise TypeError("a float value must be finite")
        return Value(FloatDomain(), self.data)
 
    def __call__(self):
        if not isfinite(self.data):
            raise TypeError("a decimal value must be finite")
        return Value(DecimalDomain(), self.data)