Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 2 xml.etree.ElementTree documentation tutorial uses undocumented arguments #79332

Closed
epakai mannequin opened this issue Nov 3, 2018 · 2 comments
Closed

Python 2 xml.etree.ElementTree documentation tutorial uses undocumented arguments #79332

epakai mannequin opened this issue Nov 3, 2018 · 2 comments
Labels
docs Documentation in the Doc dir

Comments

@epakai
Copy link
Mannequin

epakai mannequin commented Nov 3, 2018

BPO 35151
Nosy @serhiy-storchaka, @tirkarthi

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2020-05-31.13:34:13.249>
created_at = <Date 2018-11-03.00:20:18.355>
labels = ['docs']
title = 'Python 2 xml.etree.ElementTree documentation tutorial uses undocumented arguments'
updated_at = <Date 2020-05-31.13:34:13.248>
user = 'https://bugs.python.org/epakai'

bugs.python.org fields:

activity = <Date 2020-05-31.13:34:13.248>
actor = 'serhiy.storchaka'
assignee = 'docs@python'
closed = True
closed_date = <Date 2020-05-31.13:34:13.249>
closer = 'serhiy.storchaka'
components = ['Documentation']
creation = <Date 2018-11-03.00:20:18.355>
creator = 'epakai'
dependencies = []
files = []
hgrepos = []
issue_num = 35151
keywords = []
message_count = 2.0
messages = ['329174', '370452']
nosy_count = 4.0
nosy_names = ['docs@python', 'serhiy.storchaka', 'xtreak', 'epakai']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue35151'
versions = ['Python 2.7']

@epakai
Copy link
Mannequin Author

epakai mannequin commented Nov 3, 2018

In python 2 documentation 19.7.1.6
(https://docs.python.org/2/library/xml.etree.elementtree.html#parsing-xml-with-namespaces)
a second argument (ns) is passed to find and findall.

However 19.7.3.2
(https://docs.python.org/2/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.find)
only specifies the single match argument.

If we compare the python 3 documentation the namespaces argument is included in the find method. (https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.find)

Maybe the tutorial was created for python 3 version? I assume the function arguments are automatically generated, but I have not tested or tried these functions in python 2. I just stumbled on the docs while working with python 3.

@epakai epakai mannequin assigned docspython Nov 3, 2018
@epakai epakai mannequin added the docs Documentation in the Doc dir label Nov 3, 2018
@serhiy-storchaka
Copy link
Member

Python 2.7 is no longer supported.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

No branches or pull requests

1 participant