last tweaks
This commit is contained in:
parent
10b3d6c3cc
commit
a0e95692e0
@ -9,28 +9,32 @@ def _add_native_methods(mod):
|
|||||||
|
|
||||||
|
|
||||||
def _plus(*args):
|
def _plus(*args):
|
||||||
ret = 0
|
ret = args[0]
|
||||||
|
args = args[1:]
|
||||||
for x in args:
|
for x in args:
|
||||||
ret += x
|
ret += x
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
def _subtract(*args):
|
def _subtract(*args):
|
||||||
ret = 0
|
ret = args[0]
|
||||||
|
args = args[1:]
|
||||||
for x in args:
|
for x in args:
|
||||||
ret -= x
|
ret -= x
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
def _mult(*args):
|
def _mult(*args):
|
||||||
ret = 1
|
ret = args[0]
|
||||||
|
args = args[1:]
|
||||||
for x in args:
|
for x in args:
|
||||||
ret *= x
|
ret *= x
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
def _divide(*args):
|
def _divide(*args):
|
||||||
ret = 1
|
ret = args[0]
|
||||||
|
args = args[1:]
|
||||||
for x in args:
|
for x in args:
|
||||||
ret /= x
|
ret /= x
|
||||||
return ret
|
return ret
|
||||||
|
Loading…
x
Reference in New Issue
Block a user