File tree Expand file tree Collapse file tree 3 files changed +62
-0
lines changed
Expand file tree Collapse file tree 3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,11 @@ pyisinstance
131131pyhash
132132pyiter
133133pynext
134+ pyhelp
135+ pyprint
136+ pyall
137+ pyany
138+ pycallable
134139```
135140
136141### Conversion to Julia
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ include("convert.jl")
1717# abstract interfaces
1818include (" abstract/object.jl" )
1919include (" abstract/iter.jl" )
20+ include (" abstract/builtins.jl" )
2021include (" abstract/number.jl" )
2122include (" abstract/collection.jl" )
2223# concrete types
Original file line number Diff line number Diff line change 1+ # Builtin functions not covered elsewhere
2+
3+ """
4+ pyprint(...)
5+
6+ Equivalent to `print(...)` in Python.
7+ """
8+ pyprint (args... ; kwargs... ) = (pydel! (pybuiltins. print (args... ; kwargs... )); nothing )
9+ export pyprint
10+
11+ """
12+ pyhelp(x)
13+
14+ Equivalent to `help(x)` in Python.
15+ """
16+ pyhelp (x) = (pydel! (pybuiltins. help (x)); nothing )
17+ export pyhelp
18+
19+ """
20+ pyall(x)
21+
22+ Equivalent to `all(x)` in Python.
23+ """
24+ function pyall (x)
25+ y = pybuiltins. all (x)
26+ z = pybool_asbool (y)
27+ pydel! (y)
28+ z
29+ end
30+ export pyall
31+
32+ """
33+ pyany(x)
34+
35+ Equivalent to `any(x)` in Python.
36+ """
37+ function pyany (x)
38+ y = pybuiltins. any (x)
39+ z = pybool_asbool (y)
40+ pydel! (y)
41+ z
42+ end
43+ export pyany
44+
45+ """
46+ pycallable(x)
47+
48+ Equivalent to `callable(x)` in Python.
49+ """
50+ function pycallable (x)
51+ y = pybuiltins. callable (x)
52+ z = pybool_asbool (y)
53+ pydel! (y)
54+ z
55+ end
56+ export pycallable
You can’t perform that action at this time.
0 commit comments