mirror of
https://github.com/SickGear/SickGear.git
synced 2024-11-27 23:23:38 +00:00
e56303798c
Initial SickGear for Python 3.
27 lines
591 B
Python
27 lines
591 B
Python
from __future__ import unicode_literals
|
|
|
|
from ..conversions import *
|
|
from ..func_utils import *
|
|
|
|
|
|
def Number(this, args):
|
|
if len(args) == 0:
|
|
return 0.
|
|
return to_number(args[0])
|
|
|
|
|
|
def NumberConstructor(args, space):
|
|
temp = space.NewObject()
|
|
temp.prototype = space.NumberPrototype
|
|
temp.Class = 'Number'
|
|
temp.value = float(to_number(get_arg(args, 0)) if len(args) > 0 else 0.)
|
|
return temp
|
|
|
|
|
|
CONSTS = {
|
|
'MAX_VALUE': 1.7976931348623157e308,
|
|
'MIN_VALUE': 5.0e-324,
|
|
'NaN': NaN,
|
|
'NEGATIVE_INFINITY': Infinity,
|
|
'POSITIVE_INFINITY': -Infinity
|
|
}
|