Skip to content

Misleading: "The statement import results in bytecode resembling __import__" #101423

@fercsi

Description

@fercsi

Documentation

Minor issue:

There is a misleading text formulation in library/functions at description of __import__: "For example, the statement import spam results in bytecode resembling the following code: spam = __import__('spam', globals(), locals(), [], 0)".

Although the functionality is very similar, the bytecode itself is completely different. This is because in case of the __import__ variant, there are lot's of stack and "search" operations, while import operates already with a single instruction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions