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

Open
#101,423 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
58/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

Start at the library/functions documentation section for __import__ and compare the wording with the distinction described in the issue. Update the misleading bytecode claim so it accurately describes the relationship between import and __import__; done when the documentation no longer says the bytecode resembles the shown call.

Written by the indexing model from the issue text.

Description

docs

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.

Dominant language
Python
Stars
77.2k
Forks
36k
Avg merge
1d 9h
Merged PRs (30d)
558

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python/cpython

All issues in python/cpython

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.