From 8d0d0de89720c5da0357677a102bf8e51fd1eb11 Mon Sep 17 00:00:00 2001 From: Simon Forman Date: Thu, 23 Apr 2020 21:39:29 -0700 Subject: [PATCH] Fixes #38239 rename parameter of stack.pick() --- joy/utils/stack.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/joy/utils/stack.py b/joy/utils/stack.py index 590135d..afff8b6 100644 --- a/joy/utils/stack.py +++ b/joy/utils/stack.py @@ -175,21 +175,21 @@ def concat(quote, expression): -def pick(s, n): +def pick(stack, n): ''' Return the nth item on the stack. - :param stack s: A stack. + :param stack stack: A stack. :param int n: An index into the stack. :raises ValueError: if ``n`` is less than zero. - :raises IndexError: if ``n`` is equal to or greater than the length of ``s``. + :raises IndexError: if ``n`` is equal to or greater than the length of ``stack``. :rtype: whatever ''' if n < 0: raise ValueError while True: try: - item, s = s + item, stack = stack except ValueError: raise IndexError n -= 1