'Create a decimal point instance.
>>> Decimal(\'3.14\')              # string input
Decimal("3.14")
>>> Decimal((0, (3, 1, 4), -2))  # tuple input (sign, digit_tuple, exponent)
Decimal("3.14")
>>> Decimal(314)                 # int or long
Decimal("314")
>>> Decimal(Decimal(314))        # another decimal instance
Decimal("314")'

def __new__(cls, value='0', context=None):

    self = object.__new__(cls)
    self._is_special = False
    if isinstance(value, _WorkRep):
        self._sign = value.sign
        self._int = tuple(map(int, str(value.int)))
        self._exp = int(value.exp)
        return self
    if isinstance(value, Decimal):
        self._exp = value._exp
        self._sign = value._sign
        self._int = value._int
        self._is_special = value._is_special
        return self
    if isinstance(value, (int, long)):
        if (value >= 0):
            self._sign = 0
        else:
            self._sign = 1
        self._exp = 0
        self._int = tuple(map(int, str(abs(value))))
        return self
    if isinstance(value, (list, tuple)):
        if (len(value) != 3):
            raise ValueError, 'Invalid    arguments'
        if (value[0] not in (0, 1)):
            raise ValueError, 'Invalid    sign'
        for digit in value[1]:
            if ((not isinstance(digit, (int, long))) or (digit < 0)):
                raise ValueError, 'The    second    value    in    the    tuple    must    be    composed    of    non    negative    integer    elements.'
        self._sign = value[0]
        self._int = tuple(value[1])
        if (value[2] in ('F', 'n', 'N')):
            self._exp = value[2]
            self._is_special = True
        else:
            self._exp = int(value[2])
        return self
    if isinstance(value, float):
        raise TypeError(('Cannot    convert    float    to    Decimal.        ' + 'First    convert    the    float    to    a    string'))
    if (context is None):
        context = getcontext()
    if isinstance(value, basestring):
        if _isinfinity(value):
            self._exp = 'F'
            self._int = (0,)
            self._is_special = True
            if (_isinfinity(value) == 1):
                self._sign = 0
            else:
                self._sign = 1
            return self
        if _isnan(value):
            (sig, sign, diag) = _isnan(value)
            self._is_special = True
            if (len(diag) > context.prec):
                (self._sign, self._int, self._exp) = context._raise_error(ConversionSyntax)
                return self
            if (sig == 1):
                self._exp = 'n'
            else:
                self._exp = 'N'
            self._sign = sign
            self._int = tuple(map(int, diag))
            return self
        try:
            (self._sign, self._int, self._exp) = _string2exact(value)
        except ValueError:
            self._is_special = True
            (self._sign, self._int, self._exp) = context._raise_error(ConversionSyntax)
        return self
    raise TypeError(('Cannot    convert    %r    to    Decimal' % value))
