diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-10-31 12:59:29 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-10-31 12:59:29 +0000 |
| commit | a4ffd9468c4bf3bd9da9b40cb336eb91bfdbf987 (patch) | |
| tree | ec312921b0348e227d62b3007348ff7c11fbba10 /src/main/resources/python/runtime | |
| parent | cc7e5865de3e68c1ec2a5a12d40a7925d7b95e2d (diff) | |
Move Python runtime into resources
Diffstat (limited to 'src/main/resources/python/runtime')
| -rw-r--r-- | src/main/resources/python/runtime/_couscous.py | 5 | ||||
| -rw-r--r-- | src/main/resources/python/runtime/java/lang/Integer.py | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/main/resources/python/runtime/_couscous.py b/src/main/resources/python/runtime/_couscous.py new file mode 100644 index 0000000..0183f0b --- /dev/null +++ b/src/main/resources/python/runtime/_couscous.py @@ -0,0 +1,5 @@ +def _div_round_to_zero(a, b): + return -(-a // b) if (a < 0) ^ (b < 0) else a // b + +def _mod_round_to_zero(a, b): + return -(-a % b) if (a < 0) ^ (b < 0) else a % b
\ No newline at end of file diff --git a/src/main/resources/python/runtime/java/lang/Integer.py b/src/main/resources/python/runtime/java/lang/Integer.py new file mode 100644 index 0000000..052f799 --- /dev/null +++ b/src/main/resources/python/runtime/java/lang/Integer.py @@ -0,0 +1,3 @@ +class Integer(object): + def parseInt(value): + return int(value) |
