mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40:18 +00:00
Update builtins.h
This commit is contained in:
parent
15a9ec0689
commit
2192941bc8
@ -146,6 +146,12 @@ class dict:
|
|||||||
a.append(k.__json__()+': '+v.__json__())
|
a.append(k.__json__()+': '+v.__json__())
|
||||||
return '{'+ ', '.join(a) + '}'
|
return '{'+ ', '.join(a) + '}'
|
||||||
|
|
||||||
|
def round(x):
|
||||||
|
if x >= 0:
|
||||||
|
return int(x + 0.5)
|
||||||
|
else:
|
||||||
|
return int(x - 0.5)
|
||||||
|
|
||||||
def max(a, b):
|
def max(a, b):
|
||||||
if a > b:
|
if a > b:
|
||||||
return a
|
return a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user