Did I find the right examples for you? yes no

All Samples(22)  |  Call(22)  |  Derive(0)  |  Import(0)
Returns True if the value is a string, subject to false-negatives
if the string is all numeric.
'b'      is True
''       is True
' '      is True
'$3'     is True
'4,333'  is True
'33.22'  is False
'3'      is False
'-3'     is False(more...)

        def is_string(value):
    """ Returns True if the value is a string, subject to false-negatives
        if the string is all numeric.
        'b'      is True
        ''       is True
        ' '      is True
        '$3'     is True
        '4,333'  is True
        '33.22'  is False
        '3'      is False
        '-3'     is False
        3        is False
        3.3      is False
        None     is False
        Test coverage:
          - complete, via test harness
    """
    try:                    # catch integers & floats
        float(value)
        return False
    except TypeError:       # catch None
        return False
    except ValueError:      # catch characters
        return True
        


src/d/a/datagristle-0.56/gristle/tests/test_field_type.py   datagristle(Download)
    def test_is_string_basics(self):
        assert mod.is_string('b')
        assert mod.is_string('')
        assert mod.is_string(' ')
        assert mod.is_string('$3')
        assert mod.is_string('4,333.22')

src/d/a/DataGristle-HEAD/gristle/tests/test_field_type.py   DataGristle(Download)
    def test_is_string_basics(self):
        assert mod.is_string('b')
        assert mod.is_string('')
        assert mod.is_string(' ')
        assert mod.is_string('$3')
        assert mod.is_string('4,333.22')