Revision 216bb34c ncclient/content.py

b/ncclient/content.py
159 159
iselement = ET.iselement
160 160

  
161 161
def find(ele, tag, nslist=[]):
162
    """If `nslist` is empty, same as :meth:`xml.etree.ElementTree.Element.find`. If it is not, `tag` is interpreted as an unqualified name and qualified using each item in `nslist`. The first match is returned.
162
    """If *nslist* is empty, same as :meth:`xml.etree.ElementTree.Element.find`. If it is not, *tag* is interpreted as an unqualified name and qualified using each item in *nslist* (with a :const:`None` item in *nslit* meaning no qualification is done). The first match is returned.
163 163

  
164 164
    :arg nslist: optional list of namespaces
165
    :type nslit: `string` `list`
165 166
    """
166 167
    if nslist:
167 168
        for qname in multiqualify(tag):
......
174 175
def parse_root(raw):
175 176
    """Efficiently parses the root element of an XML document.
176 177

  
178
    :arg raw: XML document
177 179
    :type raw: string
178 180
    :returns: a tuple of `(tag, attributes)`, where `tag` is the (qualified) name of the element and `attributes` is a dictionary of its attributes.
181
    :rtype: `tuple`
179 182
    """
180 183
    fp = StringIO(raw[:1024]) # this is a guess but start element beyond 1024 bytes would be a bit absurd
181 184
    for event, element in ET.iterparse(fp, events=('start',)):

Also available in: Unified diff