Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Checks the initial capacity is sane

        def sane_initial_capacity(cap):
    "Checks the initial capacity is sane"
    if cap < 1000:
        raise EnvironmentError, "Initial capacity cannot be less than 1000!"
    elif cap > 1e9:
        raise Warning, "Initial capacity set very hig! Continuing..."

src/b/l/bloomd-HEAD/bloomd/conn_handler.py   bloomd(Download)
                    capacity = custom["initial_capacity"] = int(args[0])
                except (ValueError, EnvironmentError):
                    return "Client Error: Bad initial capacity!"