quick eval question

Martin von Loewis loewis at informatik.hu-berlin.de
Wed Dec 19 19:30:20 EST 2001


curtin at ubsw.com (craig curtin) writes:

> # now i want a 'path component'
> ePath ="['OUTLOOK']['CREATEDATE']"

I would not use a string to represent a path; a list is much
more natural

ePath = ['OUTLOOK','CREATEDATE']

Then you can write

res = element
for index in ePath:
  res = res[index]

HTH,
Martin



More information about the Python-list mailing list