mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Fix: Element.text is an attribute, not a method (report by Cameron Laird on docs@)
This commit is contained in:
parent
c2b17b2eba
commit
bdaee3ac95
1 changed files with 1 additions and 1 deletions
|
@ -123,7 +123,7 @@ the sub-tree below it (its children, their children, and so on). For example,
|
|||
|
||||
:meth:`Element.findall` finds only elements with a tag which are direct
|
||||
children of the current element. :meth:`Element.find` finds the *first* child
|
||||
with a particular tag, and :meth:`Element.text` accesses the element's text
|
||||
with a particular tag, and :attr:`Element.text` accesses the element's text
|
||||
content. :meth:`Element.get` accesses the element's attributes::
|
||||
|
||||
>>> for country in root.findall('country'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue