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

types._cell_factory is exposed, unlike other helpers #96415

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

Description

@sobolevn

types.py module has different helpers to get their types, likeasync def _c(): pass to get coroutine type ordef _g(): yield 1 to get generator type, etc.

It has has these line to getCellType:

cpython/Lib/types.py

Lines 18 to 23 in9625de6

def_cell_factory():
a=1
deff():
nonlocala
returnf.__closure__[0]
CellType=type(_cell_factory())

Afterward, all helpers are deleted, except_cell_factory, which I think should be fixed. It is not good to expose such implementation details.

And this line agrees with me:

delsys,_f,_g,_C,_c,_ag# Not for export

Related:

Metadata

Metadata

Assignees

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