[Vobject] vCard add (multiple children)

Jeffrey Harris jeffrey at osafoundation.org
Thu Apr 10 12:27:21 CDT 2008


Hi Neil,

> Apologies in advance for such a (probably) obvious question, but 
> couldn’t find what I was looking for in the archives.

It's not actually obvious.  I need to make the section of the README 
about this more prominent, I think.

Basically, 95% of the time a component will have a single child of a 
given type, so for convenience accessing the "tel" attribute returns the 
first child instance:

 >>> j.tel
<TEL{}222-2222>

If you want the full list of children, you need to append _list to the 
attribute name:

 >>> j.tel_list
[<TEL{}222-2222>, <TEL{}333-3333>]

Sincerely,
Jeffrey


More information about the VObject mailing list