Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Return elements of subset in collection, with glob support.

collection
  A collection of strings, need not be a set.
subset
  Any iterable of strings.

Items in the subset may be plain strings, "quoted strings" or
strings with*glob? characters.  Quoted strings are not globbed.

        def glob_intersection(collection, subset):
    """Return elements of subset in collection, with glob support.

    collection
      A collection of strings, need not be a set.
    subset
      Any iterable of strings.

    Items in the subset may be plain strings, "quoted strings" or
    strings with*glob? characters.  Quoted strings are not globbed.
    """

    found, missing, unmatched = [], [], []
    for identifier in unique(subset):
        if identifier[0] == '"':
            name = identifier[1:-1]
            if name in collection:
                found.append(name)
            else:
                missing.append(name)
        elif '*' not in identifier:
            if identifier in collection:
                found.append(identifier)
            else:
                missing.append(identifier)
        else:
            globbed = fnmatch.filter(collection, identifier)
            if globbed:
                found.extend(globbed)
            else:
                unmatched.append(identifier)

    # ordered sets sure would be nice.
    return list(unique(found)), missing, unmatched
        


src/s/q/sqlautocode-0.7/sqlautocode/main.py   sqlautocode(Download)
    # fixme: don't set up output until we're sure there's work to do!
    if options.tables:
        subset, missing, unglobbed = util.glob_intersection(tablenames,
                                                            options.tables)
        for identifier in missing:

src/s/q/sqlautocode-HEAD/sqlautocode/main.py   sqlautocode(Download)
    # fixme: don't set up output until we're sure there's work to do!
    if options.tables:
        subset, missing, unglobbed = util.glob_intersection(tablenames,
                                                            options.tables)
        for identifier in missing: