The trouble with "dynamic attributes".

Ethan Furman ethan at stoneleaf.us
Fri Sep 17 19:53:28 CEST 2010


Lie Ryan wrote:
[snip]
> And even dict-syntax is not perfect for accessing XML file, e.g.:
> 
> <a>
>     <b>foo</b>
>     <b>bar</b>
> </a>
> 
> should a['b'] be 'foo' or 'bar'?

Attribute style access would also fail in this instance -- how is this 
worked-around?

--
~Ethan~



More information about the Python-list mailing list