Skip to content

'hasattr' fix to suppress only AttributeError #53875

Closed

Description

@YurySelivanov
BPO 9666
Nosy @jcea, @benjaminp
Files
  • hasattr.patch
  • 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 = 'https://github.com/benjaminp'
    closed_at = <Date 2010-08-24.03:27:52.630>
    created_at = <Date 2010-08-24.02:56:06.335>
    labels = ['type-bug', 'library', 'docs']
    title = "'hasattr' fix to suppress only AttributeError"
    updated_at = <Date 2010-09-28.17:15:20.674>
    user = 'https://bugs.python.org/YurySelivanov'

    bugs.python.org fields:

    activity = <Date 2010-09-28.17:15:20.674>
    actor = 'jcea'
    assignee = 'benjamin.peterson'
    closed = True
    closed_date = <Date 2010-08-24.03:27:52.630>
    closer = 'benjamin.peterson'
    components = ['Documentation', 'Library (Lib)']
    creation = <Date 2010-08-24.02:56:06.335>
    creator = 'Yury.Selivanov'
    dependencies = []
    files = ['18622']
    hgrepos = []
    issue_num = 9666
    keywords = ['gsoc']
    message_count = 2.0
    messages = ['114767', '114768']
    nosy_count = 4.0
    nosy_names = ['jcea', 'benjamin.peterson', 'docs@python', 'Yury.Selivanov']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue9666'
    versions = ['Python 3.2']

    Activity

    1. YurySelivanov commented on Aug 24, 2010

      YurySelivanovmannequin
      MannequinAuthor

      As discussed on python-dev mailing list (http://mail.python.org/pipermail/python-dev/2010-August/103178.html), 'hasattr' default behaviour should be changed to suppress only AttributeError exceptions. Other should pass through.

      The fix, however, shouldn't change behaviour of existing C API, functions PyObject_HasAttr and PyObject_HasAttrString in particular.

      I'm targeting this issue on Python 3.2 version, but probably it may be introduced in the next Python 3.1 maintenance release.

    2. added
      docsDocumentation in the Doc dir
      stdlibStandard Library Python modules in the Lib/ directory
      type-bugAn unexpected behavior, bug, or error
      on Aug 24, 2010
    3. benjaminp commented on Aug 24, 2010

      @benjaminp
      Contributor

      Fixed in r84294. I will not backport to 3.1. Thanks for the contribution!

    4. transferred this issue fromon Apr 10, 2022
    5. added a commit that references this issue on Dec 23, 2023
    6. added a commit that references this issue on Jan 8, 2024
    7. added a commit that references this issue on Jan 22, 2024
    8. added a commit that references this issue on Feb 11, 2024
    9. added a commit that references this issue on Sep 2, 2024
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    docsDocumentation in the Doc dirstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions