'Return a new PrettyTable instance
Arguments:
encoding - Unicode encoding scheme used to decode any encoded input
field_names - list or tuple of field names
fields - list or tuple of field names to include in displays
start - index of first data row to include in output
end - index of last data row to include in output PLUS ONE (list slice style)
header - print a header showing field names (True or False)
header_style - stylisation to apply to field names in header ("cap", "title", "upper", "lower" or None)
border - print a border around the table (True or False)
hrules - controls printing of horizontal rules after rows.  Allowed values: FRAME, HEADER, ALL, NONE
vrules - controls printing of vertical rules between columns.  Allowed values: FRAME, ALL, NONE
int_format - controls formatting of integer data
float_format - controls formatting of floating point data
padding_width - number of spaces on either side of column data (only used if left and right paddings are None)
left_padding_width - number of spaces on left hand side of column data
right_padding_width - number of spaces on right hand side of column data
vertical_char - single character string used to draw vertical lines
horizontal_char - single character string used to draw horizontal lines
junction_char - single character string used to draw line junctions
sortby - name of field to sort rows by
sort_key - sorting key function, applied to data points before sorting
valign - default valign for each row (None, "t", "m" or "b")
reversesort - True or False to sort in descending or ascending order'

@_ansi
def __init__(self, field_names=None, **kwargs):

    self.encoding = kwargs.get('encoding', 'UTF-8')
    self._field_names = []
    self._align = {}
    self._valign = {}
    self._max_width = {}
    self._rows = []
    if field_names:
        self.field_names = field_names
    else:
        self._widths = []
    self._options = 'start    end    fields    header    border    sortby    reversesort    sort_key    attributes    format    hrules    vrules'.split()
    self._options.extend('int_format    float_format    padding_width    left_padding_width    right_padding_width'.split())
    self._options.extend('vertical_char    horizontal_char    junction_char    header_style    valign    xhtml    print_empty'.split())
    for option in self._options:
        if (option in kwargs):
            self._validate_option(option, kwargs[option])
        else:
            kwargs[option] = None
    self._start = (kwargs['start'] or 0)
    self._end = (kwargs['end'] or None)
    self._fields = (kwargs['fields'] or None)
    if (kwargs['header'] in (True, False)):
        self._header = kwargs['header']
    else:
        self._header = True
    self._header_style = (kwargs['header_style'] or None)
    if (kwargs['border'] in (True, False)):
        self._border = kwargs['border']
    else:
        self._border = True
    self._hrules = (kwargs['hrules'] or FRAME)
    self._vrules = (kwargs['vrules'] or ALL)
    self._sortby = (kwargs['sortby'] or None)
    if (kwargs['reversesort'] in (True, False)):
        self._reversesort = kwargs['reversesort']
    else:
        self._reversesort = False
    self._sort_key = (kwargs['sort_key'] or (lambda x: x))
    self._int_format = (kwargs['int_format'] or {})
    self._float_format = (kwargs['float_format'] or {})
    self._padding_width = (kwargs['padding_width'] or 1)
    self._left_padding_width = (kwargs['left_padding_width'] or None)
    self._right_padding_width = (kwargs['right_padding_width'] or None)
    self._vertical_char = (kwargs['vertical_char'] or self._unicode('|'))
    self._horizontal_char = (kwargs['horizontal_char'] or self._unicode('-'))
    self._junction_char = (kwargs['junction_char'] or self._unicode('+'))
    if (kwargs['print_empty'] in (True, False)):
        self._print_empty = kwargs['print_empty']
    else:
        self._print_empty = True
    self._format = (kwargs['format'] or False)
    self._xhtml = (kwargs['xhtml'] or False)
    self._attributes = (kwargs['attributes'] or {})
