-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
types.py module has different helpers to get their types, like async def _c(): pass to get coroutine type or def _g(): yield 1 to get generator type, etc.
It has has these line to get CellType:
Lines 18 to 23 in 9625de6
| def _cell_factory(): | |
| a = 1 | |
| def f(): | |
| nonlocal a | |
| return f.__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:
Line 63 in 9625de6
| del sys, _f, _g, _C, _c, _ag # Not for export |
Related:
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error