Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

object.__getattribute__ does not setname andobj ofAttributeError #96352

Closed
Labels
type-bugAn unexpected behavior, bug, or error
@philg314

Description

@philg314

Bug report

object.__getattribute__ does not setname andobj ofAttributeError:

classTest:passtest=Test()try:print("test.a")test.aexceptAttributeErrorase:print(f"{e=}")print(f"{e.name=}")print(f"{e.obj=}")print()try:print('object.__getattribute__(test, "a")')object.__getattribute__(test,"a")exceptAttributeErrorase:print(f"{e=}")print(f"{e.name=}")print(f"{e.obj=}")

Output:

test.ae=AttributeError("'Test' object has no attribute 'a'")e.name='a'e.obj=<__main__.Test object at 0x7f2fc87a8760>object.__getattribute__(test, "a")e=AttributeError("'Test' object has no attribute 'a'")e.name=Nonee.obj=None
  • CPython versions tested on: Python 3.10.5, Python 3.12.0a0

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp