'Constructor
@param lookup: the name of the lookup table
@param key: the field name of the primary key of the lookup table,
a field name
@param fields: the fields to extract from the lookup table, a list
of field names
@param labels: string template or callable to represent rows from
the lookup table, callables must return a string
@param options: dictionary of options to lookup the representation
of a value, overrides lookup and key
@param multiple: web2py list-type (all values will be lists)
@param hierarchy: render a hierarchical representation, either
True or a string template like "%s > %s"
@param translate: translate all representations (using T)
@param linkto: a URL (as string) to link representations to,
with "[id]" as placeholder for the key
@param show_link: whether to add a URL to representations
@param default: default representation for unknown options
@param none: representation for empty fields (None or empty list)
@param field_sep: separator to use to join fields'

def __init__(self, lookup=None, key=None, fields=None, labels=None, options=None, translate=False, linkto=None, show_link=False, multiple=False, hierarchy=False, default=None, none=None, field_sep='    '):

    self.tablename = lookup
    self.table = None
    self.key = key
    self.fields = fields
    self.labels = labels
    self.options = options
    self.list_type = multiple
    self.hierarchy = hierarchy
    self.translate = translate
    self.linkto = linkto
    self.show_link = show_link
    self.default = default
    self.none = none
    self.field_sep = field_sep
    self.setup = False
    self.theset = None
    self.queries = 0
    self.lazy = []
    self.lazy_show_link = False
    self.rows = {}
    self.func_code = Storage(co_argcount=1)
    self.func_defaults = None
    if hasattr(self, 'lookup_rows'):
        self.custom_lookup = True
    else:
        self.lookup_rows = self._lookup_rows
        self.custom_lookup = False
