-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a8cff5a
commit 8d66ebd
Showing
14 changed files
with
365 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
from interpreter.basic_value import BasicValue | ||
|
||
# pyimport("examples/python_methods.py", "__testq__", "dictionaries"); | ||
# pyimport("examples/python_methods.py", "__testw__", "lists"); | ||
|
||
def dictionaries(arguments): | ||
return BasicValue({"A": "B"}) | ||
|
||
def lists(arguments): | ||
return BasicValue(["A", "B"]) | ||
|
||
def p(arguments): | ||
print(arguments.arguments[0].extract_value()) | ||
return BasicValue(arguments.arguments[0].extract_value()) | ||
if len(arguments.arguments) > 0: | ||
print(arguments.arguments[0].extract_value()) | ||
return BasicValue(arguments.arguments[0].extract_value()) | ||
print("Nothing provided.") | ||
return BasicValue("Nothing provided.") | ||
|
||
# Now just run: | ||
# pyimport("examples/python_methods.py", "__p__", "p"); | ||
# pyimport("examples/python_methods.py", ["__p__"], ["p"]); | ||
# pyimport("examples/python_methods.py", Dict.new(["__p__"], ["p"])); | ||
# To add it to ParaCode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.