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

None is not a valid value for ast.ImportFrom.level #92986

Closed
Assignees
isidentical
Labels
stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@hauntsaninja

Description

@hauntsaninja

For example:

import asttree = ast.parse("from x import y")tree.body[0].level = Noneast.unparse(tree)  # raises

This is very similar tohttps://bugs.python.org/issue46289 and#30467 cc@isidentical

Note the compiler does seem to allow it, but it's always an int in practice and documented as such

Discovered in typeshed.

Metadata

Metadata

Assignees

Labels

stdlibStandard 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


    [8]ページ先頭

    ©2009-2025 Movatter.jp