Did I find the right examples for you? yes no

All Samples(34)  |  Call(34)  |  Derive(0)  |  Import(0)
Checks for negative values in a variable number of spec lists
Each spec list can have multiple strings.  Each string within each
list will be searched for a '-' sign.

        def is_negative_spec(*specs):
    """ Checks for negative values in a variable number of spec lists
        Each spec list can have multiple strings.  Each string within each
        list will be searched for a '-' sign.
    """
    for specset in specs:
        if specset:
            for spec in specset:
                if '-' in spec:
                    return True
    return False
        


src/d/a/datagristle-0.56/gristle/tests/test_location_slicer.py   datagristle(Download)
    def test_is_negative_spec_simple_inputs(self):
        assert mod.is_negative_spec(['1']) is False
        assert mod.is_negative_spec(['1'],['1']) is False
        assert mod.is_negative_spec(['1'],['1'],['2'],['-12'])
        assert mod.is_negative_spec(['-1'],['1'],['2'],['-12'])
        assert mod.is_negative_spec(['0'],['1'],['2'],['3']) is False

src/d/a/DataGristle-HEAD/gristle/tests/test_location_slicer.py   DataGristle(Download)
    def test_is_negative_spec_simple_inputs(self):
        assert mod.is_negative_spec(['1']) is False
        assert mod.is_negative_spec(['1'],['1']) is False
        assert mod.is_negative_spec(['1'],['1'],['2'],['-12'])
        assert mod.is_negative_spec(['-1'],['1'],['2'],['-12'])
        assert mod.is_negative_spec(['0'],['1'],['2'],['3']) is False