@@ -65,9 +65,12 @@ module PYTHON-SEMANTICS-DUNDER-BUILTIN
6565 object "ValueError" ("type" ,ListItem("Exception" ),.,.) ~>
6666 object "Warning" ("type" ,ListItem("Exception" ),.,.) ~>
6767 object "ZeroDivisionError" ("type" , ListItem("ArithmeticError" ),.,.) ~>
68+ (def "abs" (1 , 1 , false) ;) ~>
6869 (def "all" (1 , 1 , false) ;) ~>
70+ (def "any" (1 , 1 , false) ;) ~>
6971 object "bool" ("type" ,ListItem("int" ),
70- "__new__" |-> def "new_bool" (1 , 2 , false)
72+ "__new__" |-> def "bool.__new__" (1 , 2 , false)
73+ "__str__" |-> def "bool.__str__" (0, 0, true)
7174 ,.) ~>
7275 object "bytearray" ("type" ,ListItem("object" ),
7376 "__new__" |-> def "bytearray.__new__" (1 , -1 , false)
@@ -87,6 +90,7 @@ module PYTHON-SEMANTICS-DUNDER-BUILTIN
8790 "__radd__" |-> def "radd_bytes" (1 , 1 , true)
8891 "__rmul__" |-> def "rmul_bytes" (1 , 1 , true)
8992 ,.) ~>
93+ (def "callable" (1 , 1 , false) ;) ~>
9094 object "classmethod" ("type" , ListItem("object" ),
9195 "__get__" |-> def "get_classmethod" (1 , 2 , true)
9296 "__init__" |-> def "init_classmethod" (1 , 1 , true)
@@ -121,6 +125,7 @@ module PYTHON-SEMANTICS-DUNDER-BUILTIN
121125 "__le__" |-> def "float.__le__" (1 , 1 , true)
122126 "__lt__" |-> def "float.__lt__" (1 , 1 , true)
123127 "__ne__" |-> def "float.__ne__" (1 , 1 , true)
128+ "__new__" |-> def "float.__new__" (1 , 2 , false)
124129 ,.) ~>
125130 (def "format" (1 , 2 , false) ;) ~>
126131 (def "getattr" (2 , 3 , false) ;) ~>
@@ -137,7 +142,7 @@ module PYTHON-SEMANTICS-DUNDER-BUILTIN
137142 "__ceil__" |-> def "ceil_int" (0, 0, true)
138143 //TODO: divmod, doc
139144 "__eq__" |-> def "eq_int" (1 , 1 , true)
140- //TODO: float
145+ "__float__" |-> def "int.__float__" (0, 0, true)
141146 "__floor__" |-> def "floor_int" (0, 0, true)
142147 "__floordiv__" |-> def "floordiv_int" (1 , 1 , true)
143148 //TODO: format
@@ -218,6 +223,7 @@ module PYTHON-SEMANTICS-DUNDER-BUILTIN
218223 "__setattr__" |-> def "module.__setattr__" (2 , 2 , true)
219224 ,.) ~>
220225 object "module.__dict__" ("attribute" ,.,., "__get__" |-> "__dict__" ) ~>
226+ (def "next" (1 , 2 , false) ;) ~>
221227 object "object" ("type" ,.,
222228 "__class__" |-> ref("__class__" )
223229 "__getattribute__" |-> def "getattribute_object" (1 , 1 , true)
@@ -285,6 +291,7 @@ module PYTHON-SEMANTICS-DUNDER-BUILTIN
285291 "__mod__" |-> def "mod_str" (1 , 1 , true)
286292 "__mul__" |-> def "mul_str" (1 , 1 , true)
287293 "__ne__" |-> def "ne_str" (1 , 1 , true)
294+ "__new__" |-> def "str.__new__" (1 , 4 , false)
288295 "__repr__" |-> def "str.__repr__" (0, 0, true)
289296 ,.) ~>
290297 object "super" ("type" ,ListItem("object" ),
@@ -606,9 +613,11 @@ module PYTHON-SEMANTICS-DUNDER-BUILTIN
606613 , "__debug__" : #if Constants("PYTHONOPTIMIZE") ==Int 0 #then ref("True") #else ref("False") #fi
607614 , "__doc__" : "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices."
608615 , "all" : ref("all" )
616+ , "any" : ref("any" )
609617 , "bool" : ref("bool" )
610618 , "bytearray" : ref("bytearray" )
611619 , "bytes" : ref("bytes" )
620+ , "callable" : ref("callable" )
612621 , "classmethod" : ref("classmethod" )
613622 , "compile" : ref("compile" )
614623 , "complex" : ref("complex" )
@@ -630,6 +639,7 @@ module PYTHON-SEMANTICS-DUNDER-BUILTIN
630639 , "list" : ref("list" )
631640 , "locals" : ref("locals" )
632641 , "map" : ref("map" )
642+ , "next" : ref("next" )
633643 , "object" : ref("object" )
634644 , "ord" : ref("ord" )
635645 , "range" : ref("range" )
0 commit comments