Overview
| Artifact ID: | c9f0351c638d18a368aecf2effb8beca3ad1c742920269eff9ef337c5181c0cd |
|---|---|
| Ticket: | 3019348fffffffffffffffffffffffffffffffff
Nested lset can modify list on error |
| User & Date: | apnadkarni on 2026-10-17 16:54:54 |
Changes
- assignee changed to: "apnadkarni"
- closer changed to: "nobody"
- comment changed to:
My expectation is that when lset throws an error, it won't modify the list. However, the following script shows otherwise: % set foo {} % lset foo 0 0 x x % lset foo 0 1 x {x x} % lset foo 1 0 x {x x} x % lset foo 1 1 x {x x} {x x} % lset foo 2 1 x list index out of range % set foo {x x} {x x} {} % lset foo 3 0 x {x x} {x x} {} x % lset foo 3 1 x {x x} {x x} {} {x x} The command [lset foo 2 1 x] throws an error but also adds an empty element to the end of the list. - login: "apnadkarni"
- mimetype: "text/plain"
- severity changed to: "Minor"