[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zsh style associative array assignment bug

From: Ilkka Virta
Subject: Re: zsh style associative array assignment bug
Date: Wed, 31 Mar 2021 00:25:44 +0300

On Tue, Mar 30, 2021 at 1:40 AM Eric Cook <llua@gmx.com> wrote:

> Its just when populating that array dynamically with another array
> if that second array didn't contain `v1' hypothetically, the array gets
> shifted to
> a=( [k1]=k2 [v2]=k3 [v3]= )
> which i would imagine to be unexpected for the author of the code and
> would rather
> it error out instead of chugging along.

Just checking the parity can never help if there's a risk of values missing
from the middle of the list.
What if there's two values missing? You could be left with (k1 v1 k2 k3) or
(k1 v1 k2 v3).

reply via email to

[Prev in Thread] Current Thread [Next in Thread]