Did I find the right examples for you? yes no

All Samples(26)  |  Call(26)  |  Derive(0)  |  Import(0)
Returns True if the input consists soley of digits and represents an
integer rather than character data or a float.
'3'       is True
'-3'      is True
3         is True
-3        is True
3.3       is False
'33.22'   is False
'4,333'   is False
'$3'      is False(more...)

        def is_integer(value):
    """ Returns True if the input consists soley of digits and represents an
        integer rather than character data or a float.
        '3'       is True
        '-3'      is True
        3         is True
        -3        is True
        3.3       is False
        '33.22'   is False
        '4,333'   is False
        '$3'      is False
        ''        is False
        'b'       is False
        None      is False
        Test coverage:
          - complete, via test harness
    """
    try:
        i            = float(value)
        fract, dummy = math.modf(i)
        if fract > 0:
            return False
        else:
            return True
    except ValueError:
        return False
    except TypeError:
        return False
        


src/d/a/datagristle-0.56/gristle/field_misc.py   datagristle(Download)
        if typer.is_unknown(key):
            freq['unk']    += 1
        elif typer.is_integer(key):     # will be ignoring these
            freq['number'] += 1
        elif typer.is_float(key):       # will be ignoring these

src/d/a/DataGristle-HEAD/gristle/field_misc.py   DataGristle(Download)
        if typer.is_unknown(key):
            freq['unk']    += 1
        elif typer.is_integer(key):     # will be ignoring these
            freq['number'] += 1
        elif typer.is_float(key):       # will be ignoring these

src/d/a/datagristle-0.56/gristle/tests/test_field_type.py   datagristle(Download)
    def test_is_integer_basics(self):
        assert mod.is_integer('3')
        assert mod.is_integer('-3')
        assert mod.is_integer(3)
        assert mod.is_integer(-3)
        assert mod.is_integer('b')        is False

src/d/a/DataGristle-HEAD/gristle/tests/test_field_type.py   DataGristle(Download)
    def test_is_integer_basics(self):
        assert mod.is_integer('3')
        assert mod.is_integer('-3')
        assert mod.is_integer(3)
        assert mod.is_integer(-3)
        assert mod.is_integer('b')        is False