-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstdlib.py
79 lines (48 loc) · 988 Bytes
/
stdlib.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
from z3 import Length, Replace
# noinspection PyPep8Naming
def And(x: bool, y: bool) -> bool:
if x:
return y
return False
# noinspection PyPep8Naming
def Or(x: bool, y: bool) -> bool:
if x:
return True
return y
# noinspection PyPep8Naming
def Not(x: bool) -> bool:
if x:
return False
return True
# noinspection PyShadowingBuiltins
def hash(x: int) -> int:
return x
# noinspection PyShadowingBuiltins
def len(s: str) -> int:
# noinspection PyTypeChecker
return Length(s)
def str_replace(s: str, old: str, new: str) -> str:
# noinspection PyTypeChecker
return Replace(s, old, new)
def ValueError():
pass
def TypeError():
pass
def Exception():
pass
def range(n: int):
pass
def __assume__(s):
pass
def __literal__(s):
pass
def is_valid(s):
pass
def id(s):
pass
def int(num: float) -> int:
pass
def singleton_list(s):
pass
def list_of(l, sort):
pass