• R/O
  • HTTP
  • SSH
  • HTTPS

Thun: Commit

Interpreter and library.


Commit MetaInfo

Revisionaa43eb668492e03a5d2c6cc5010479f6e0cba220 (tree)
Time2020-12-19 09:10:45
AuthorSimon Forman <sforman@hush...>
CommiterSimon Forman

Log Message

Minor cleanup.

Change Summary

Incremental Difference

--- a/joy/utils/stack.py
+++ b/joy/utils/stack.py
@@ -206,17 +206,15 @@ def dnd(stack, from_index, to_index):
206206 h, stack = stack
207207 head.append(h)
208208 diff += 1
209- stack = item, stack
210- while head:
211- stack = head.pop(), stack
212209 else:
213210 # from > to
214211 # so the destination is in the head list
215- while head:
212+ while diff:
216213 stack = head.pop(), stack
217- from_index -= 1
218- if from_index == to_index:
219- stack = item, stack
214+ diff -= 1
215+ stack = item, stack
216+ while head:
217+ stack = head.pop(), stack
220218 return stack
221219
222220
Show on old repository browser