Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ab336a50b0405f15cddf87cbad7bd03253ea83b93382543f688b6027ba815def
Ticket: 999b6966b29915bf9e3754969e5521e7573dc667
lseq has incorrect results in edge cases
User & Date: cdubois on 2026-01-12 03:32:17
Changes

  1. icomment:
    +1 on Harald's suggestion. It seems more consistent if `lseq` always returns the start element, independent of the step sign, and only the generation of subsequent elements is affected by direction/sign.
    
    If that is the intended behavior, I can draft a small regression-test patch covering the reported cases (sign mismatch with large `by`, and the `start==end` “directionless” case). We may also want to decide and document what should happen for `by 0` (error vs empty list).
    
  2. login: "cdubois"
  3. mimetype: "text/plain"