def form(url, method="post", multipart=False, hidden_fields=None, **attrs):
    fields = []
    attrs["action"] = url
    if multipart:
        attrs["enctype"] = "multipart/form-data"
    if method.lower() in ['post', 'get']:
        attrs['method'] = method
    else:
        attrs['method'] = "post"
        field = hidden("_method", method, id=None)
        fields.append(field)
    if hidden_fields is not None:
        try:
            it = hidden_fields.items()
        except AttributeError:
            it = hidden_fields
        for name, value in it:
            field = hidden(name, value, id=None)
            fields.append(field)
    if fields:
        div = HTML.tag("div", style="display:none", _nl=True, *fields)
    else:
        div = None
    return HTML.tag("form", div, _closed=False, **attrs)
fieldname is the name of the field to search. start and end are the
dataset/ETHPy150Open mikeorr/WebHelpers2/webhelpers2/html/tags.py/form--crossover with--dataset/ETHPy150Open tallstreet/Whoosh-AppEngine/src/whoosh/query.py/TermRange.__init__