[Snek] [keith-packard/snek] ffdb24: Allow 3 * 'a' as well as 'a' * 3

Keith Packard noreply at github.com
Fri Jan 14 20:39:27 PST 2022


  Branch: refs/heads/string-times
  Home:   https://github.com/keith-packard/snek
  Commit: ffdb245d5b1bf54fbfa20eeec4b64c18d06f2c57
      https://github.com/keith-packard/snek/commit/ffdb245d5b1bf54fbfa20eeec4b64c18d06f2c57
  Author: Keith Packard <keithp at keithp.com>
  Date:   2022-01-14 (Fri, 14 Jan 2022)

  Changed paths:
    M snek-exec.c
    M test/Makefile
    A test/pass-str-op.py

  Log Message:
  -----------
  Allow 3 * 'a' as well as 'a' * 3

Replication of strings and lists is supposed to work with operands in
either order, so check for that and flip them around.

Add tests for string operators.

Signed-off-by: Keith Packard <keithp at keithp.com>




More information about the Snek mailing list