Menu

#184 MPI list funcs LREMOVE doesn't act on single item {null:}

Critical
open
sombre
8
2005-07-13
2003-05-27
No

List functions lcommon, lremove, etc don't act upon a
passed, given argument of null.

This means you have to pass two nulls in a list to
remove null items from a list, or a null at the
begining (but not end) of a passed list.

Null items in a passed list are just lost.

Examples:
@mpi {mklist:{null:},one,two}
"
one
two"

@mpi {mklist:{null:},one,two,{null:}}
"
one
two
"

@mpi {lremove:{mklist:{null:},one,two,{null:}},one}
"
two"

@mpi
{lremove:{mklist:{null:},one,two,{null:}},{mklist:{null:}}}
"
one
two"

@mpi
{lremove:{mklist:{null:},one,two,{null:}},{mklist:one,{null:}}}
"
two"

@mpi
{lremove:{mklist:{null:},one,two,{null:}},{mklist:{null:},{null:}}}
"one
two"

Inconsistent (and annoying).

This may turn into a feature request for an lstrip command?

Discussion

  • Natasha O'Brien

    Natasha O'Brien - 2003-08-15

    Logged In: YES
    user_id=9698

    Should be fixed in CVS.

     
  • Kyle Hamilton

    Kyle Hamilton - 2003-09-02
    • status: open --> pending
     
  • Kyle Hamilton

    Kyle Hamilton - 2003-09-02

    Logged In: YES
    user_id=7718

    Set pending so that crissa has the chance to test and
    respond if not fixed.

     
  • Natasha O'Brien

    Natasha O'Brien - 2003-09-02

    Logged In: YES
    user_id=9698

    sombre told me out-of-band that it still doesn't work right.
    IIRC the test he said failed was that:

    {lremove:{mklist:{null},one,two,{null}},}

    still had a {null} in it.

     
  • Kyle Hamilton

    Kyle Hamilton - 2003-09-02

    Logged In: YES
    user_id=7718

    Still had literal '{null}', or still had a null entry?

    Assigning to sombre for clarification.

     
  • Kyle Hamilton

    Kyle Hamilton - 2003-09-02
    • assigned_to: nobody --> sombre
    • status: pending --> open
     
  • Wyld

    Wyld - 2005-07-13
    • priority: 5 --> 7
     
  • Wyld

    Wyld - 2005-07-13
    • priority: 7 --> 8
     
  • Wyld

    Wyld - 2005-07-13
    • milestone: 100411 --> Critical
     

Log in to post a comment.