The trouble with "dynamic attributes".

Ethan Furman ethan at stoneleaf.us
Fri Sep 17 13:53:28 EDT 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