On Wed, Aug 10, Josef Reidinger wrote:

> 
> yast2-core from 2.17.16 has nice feature to return unchanged list if key not 
> exist
> so instead
> if( haskey( p, "create" ))
>   p = remove( p, "create" );
> }
> 
> you can write just
> p = remove( p, "create" );

Thanks, will change this...
I always hated the old behavior of remove...

> > -       else if( size(filter( map p, new["subvol"]:[], 
> > ``(p["name"]:""==pth)))>0 )
> > +       else if( size(filter( string s, SubvolNames( new ), ``(s==pth)))>0 )
> 
> for me this looks like you want check if it contains element
> so:
> else if ( contains( SubvolNames( new ), pth )

Indeed, did not think about contains when changing the code...

Tschuess, 
        Thomas Fehr
-- 
  Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
  GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
  Tel: +49-911-74053-0,  Fax: +49-911-74053-482,  Email: [email protected]
  GPG public key available.
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to