[Zope] replace values in a list or dictionary

Martijn Pieters mj@antraciet.nl
Mon, 31 May 1999 09:57:54 +0200


At 09:34 31/05/99 , TFE MMS JARVIS JOHN wrote:
>maybe you could do:
>
><!--#call "REQUEST.set('L',[1]+L[1:_.len(L)])"-->
>
>this would create a new list with the first item being 1
>and the rest being, well, the rest and replace the old list.
>

Or: <!--#call "REQUEST.set('L',[1]+L[1:])"--> (untested)

Slightly less ugly.




--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-6254545 Fax: +31-35-6254555
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------