[Zope] Accessing list elements

Smith, Neil Neil.Smith@npower.com
Fri, 25 Jan 2002 08:59:22 -0000


Strange, that was the first thing that I tried, but I thought it hadn't
worked.  The typing gremlins must have been at work again, or maybe I did it
without the quotes, Doh!  Still, at least in trying to find what is going on
I am learing a bit more about the various forms of :

  <dtml-var "myList[myIndex]">
  <dtml-var "_['myList'][myIndex]">
  <dtml-var "_.getitem('myList')[myIndex]">

Now if only I could work out exactly when it was appropriate to use each
form.

Neil Smith

-----Original Message-----
From: Thomas B. Passin [mailto:tpassin@mitretek.org]
Sent: 24 January 2002 16:27
To: zope@zope.org
Subject: Re: [Zope] Accessing list elements

In Zope,  with a Zope variable again called list, you can get its 2nd
element using

<dtml-var "list[1]">

**********************************************************************
 
The information contained in this e-mail is confidential and intended only for the use of the addressee. If the reader of this message is not the addressee, you are hereby notified that you have received this e-mail in error and you must not copy, disseminate, distribute, use or take any action as a result of the information contained in it.
    
If you have received this e-mail in error, please notify postmaster@npower.com (UK 01384 275454) and delete it immediately from your system.
    
Neither Npower nor any of the other companies in the Innogy group from whom this e-mail originates accept any responsibility for losses or damage as a result of any viruses and it is your responsibility to check attachments (if any) for viruses.

Npower Limited
Registered office: Windmill Hill Business Park, Whitehill Way, Swindon SN5 6PB. Registered in England and Wales: number 3653277

This e-mail may be sent on behalf of a member of the Innogy plc group of companies.

**********************************************************************