Explain what a source module is

Aberta
#93,378 5 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
1/5
Tempo estimado
Menos de uma hora
Facilidade para iniciantes
55/100
Tipo de issue
Documentação
Clareza
Claramente especificada
Status de atividade
Estagnada
Stack de tecnologia
python
Domínio
documentation

Direção de pesquisa

Abra o capítulo Modules vinculado no tutorial do Python e localize o parágrafo que descreve quando o cache de bytecode é verificado. Esclareça o que “source module” significa nesse parágrafo e, em seguida, verifique se a redação revisada continua consistente com a explicação ao redor sobre distribuições de código-fonte e distribuições somente compiladas.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

3.10 3.11 3.12 docs

Documentation

In the 6th tutorial chapter about Modules, the term "source module" is used.

Python does not check the cache in two circumstances. First, it always recompiles and does not store the result for the module that’s loaded directly from the command line. Second, it does not check the cache if there is no source module. To support a non-source (compiled only) distribution, the compiled module must be in the source directory, and there must not be a source module.

It isn't really specified what a "source module" is exactly. I think the original python script/module and not the compiled pyc file(s) is meant but I also think this isn't really obvious here (although a hint is given by the phrase "To support a non-source (compiled only)" in the next sentence). My initial suggestion:

Python does not check the cache in two circumstances. First, it always recompiles and does not store the result for the module that’s loaded directly from the command line. Second, it does not check the cache if there is no source module, which refers to the non-compiled python script or module. To support a non-source (compiled only) distribution, the compiled module must be in the source directory, and there must not be a source module.

Linguagem predominante
Python
Estrelas
77.2k
Forks
36k
Merge médio
1d 9h
PRs com merge (30d)
558

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de python/cpython

Todas as issues de python/cpython

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.