Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def parse_name(name):
    if "[" in name:
        location = name.find("[")
        jsonIndices = name[location:]
        wrappedindices = jsonParse.stringAsJsonSequence(jsonIndices)
        indices = []
        for x in wrappedindices:
            if len(x)!=1:
                raise ValueError, "this index notation is not supported "+repr(x)
        realname = name[:location]
        return (realname, indices)
        return (name, [])

src/w/h/whiff-1.1/whiff/middleware/envValue.py   whiff(Download)
        if not variable:
            raise ValueError, "envValue requires a non-empty variable name"
        (realname, indices) = namecomponent.parse_name(variable)
        if not env.has_key(realname):
            # deliver the default