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

TreeBuilder.end(tag) differs between cElementTree and ElementTree #51464

Closed
merrellb mannequin opened this issue Oct 26, 2009 · 1 comment
Closed

TreeBuilder.end(tag) differs between cElementTree and ElementTree #51464

merrellb mannequin opened this issue Oct 26, 2009 · 1 comment
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@merrellb
Copy link
Mannequin

merrellb mannequin commented Oct 26, 2009

BPO 7215
Superseder
  • bpo-7214: TreeBuilder.end(tag) differs between cElementTree and ElementTree
  • 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 2009-10-26.23:33:36.824>
    created_at = <Date 2009-10-26.23:32:31.813>
    labels = ['type-bug', 'library']
    title = 'TreeBuilder.end(tag) differs between cElementTree and ElementTree'
    updated_at = <Date 2009-10-27.01:40:40.104>
    user = 'https://bugs.python.org/merrellb'

    bugs.python.org fields:

    activity = <Date 2009-10-27.01:40:40.104>
    actor = 'r.david.murray'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-10-26.23:33:36.824>
    closer = 'merrellb'
    components = ['Library (Lib)']
    creation = <Date 2009-10-26.23:32:31.813>
    creator = 'merrellb'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 7215
    keywords = []
    message_count = 1.0
    messages = ['94543']
    nosy_count = 1.0
    nosy_names = ['merrellb']
    pr_nums = []
    priority = 'low'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '7214'
    type = 'behavior'
    url = 'https://bugs.python.org/issue7215'
    versions = ['Python 2.6']

    @merrellb
    Copy link
    Mannequin Author

    merrellb mannequin commented Oct 26, 2009

    In the pure python ElementTree, the tag passed to the end() tag is
    verified to be closing the last tag opened (self._last).

    This cElementTree performs no such validation and closes the last tag
    regardless of what tag is passed to the method.

    In my mind this raises a couple questions beyond simply fixing this
    discrepancy.

    1. Why make this tag mandatory if it has no effect in the cElementTree
      version (and in the pure python version is only used to verify the user
      isn't confused what tag they are closing)
    2. Could the argument be removed, simply closing the last tag if not
      present?
    3. Or could the behavior be changed to actually influence which tag is
      closed, allowing one to close all tags out to a specific
      outer/encompassing tag (much like close(), closes all tags)?

    -brian

    @merrellb merrellb mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Oct 26, 2009
    @merrellb merrellb mannequin closed this as completed Oct 26, 2009
    @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
    stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    0 participants