python xml dom help please

John J. Lee jjl at pobox.com
Tue Nov 25 14:07:40 EST 2003


and-google at doxdesk.com (Andrew Clover) writes:

> spam.meplease at ntlworld.com (deglog) wrote:
[...]
> A solution would be to make a static copy of the list beforehand. There's no
> standard-DOM way of doing that and the Python copy() method is not guaranteed
> to work here, so use a list comprehension or map:
> 
>   identity= lambda x: x
>   for node in map(identity, nodeList):
>     ...

Why not just

for node in list(nodeList):
  ...

?


John




More information about the Python-list mailing list