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

Type cache can expose previous values during finalization of an object #118492

Open
Labels
type-bugAn unexpected behavior, bug, or error
@DinoV

Description

@DinoV

Bug report

Bug description:

This should always print True, that is an attribute accessed from a class should match the value that's in the type's mappingproxy:

classX:def__del__(inner_self):v=C.aprint(v==C.__dict__['a'])classC:a=X()# prime the cacheC.aC.a# destructor shouldn't be able to see inconsisent stateC.a=X()C.a=X()

But this prints False because the destructor can be run when the assignment into the type dict occurs, but before the type version is invalidated.

CPython versions tested on:

3.8, CPython main branch

Operating systems tested on:

Linux

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