OSDN Git Service
(root)
/
joypy
/
Thun.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7285ebb
)
Better exceptions.
author
sforman
<sforman@hushmail.com>
Tue, 29 Aug 2023 03:46:19 +0000
(20:46 -0700)
committer
sforman
<sforman@hushmail.com>
Tue, 29 Aug 2023 03:46:19 +0000
(20:46 -0700)
implementations/Python/joy.py
patch
|
blob
|
history
diff --git
a/implementations/Python/joy.py
b/implementations/Python/joy.py
index
15912de
..
bcf3080
100644
(file)
--- a/
implementations/Python/joy.py
+++ b/
implementations/Python/joy.py
@@
-1340,7
+1340,7
@@
def pick(stack, n):
try:
item, stack = stack
except ValueError:
- raise IndexError
+ raise IndexError
from None
n -= 1
if n < 0:
break
@@
-1405,7
+1405,7
@@
def drop(stack):
try:
_, Q = Q
except ValueError:
- raise StackUnderflowError
+ raise StackUnderflowError
from None
n -= 1
return Q, stack
@@
-1430,7
+1430,7
@@
def take(stack):
try:
item, Q = Q
except ValueError:
- raise StackUnderflowError
+ raise StackUnderflowError
from None
x = item, x
n -= 1
return x, stack