Tutorial 4.8 call by value vs reference is confusing
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- Python
- Estrelas
- 77.2k
- Forks
- 35.9k
- Métricas de merge de PRs
- Métricas de PR pendentes
Descrição
Documentation
The part about how arguments are passed in Section 4.8 (by value vs by reference) is written in a confusing way and there is even a footnote admitting to it
IMO an improvement would be along the lines:
Arguments are always passed using call by value. For objects that are passed this value consists of a reference to that object. Which means that mutations to the object are visible outside, reassignments of another reference to the variable inside the function are not. insert example
Linked PRs
- gh-148563
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Leia a Seção 4.8 do tutorial de Python em docs.python.org/3/tutorial/controlflow.html#defining-functions, incluindo sua nota de rodapé, e revise o PR vinculado gh-148563. Considera-se concluído quando a explicação sobre passagem por valor versus referência estiver mais clara e incluir um exemplo mostrando mutação versus reatribuição.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- python
- Domínio
- documentation
- Tipo de issue
- Documentação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Status de atividade
- Estagnada
- Clareza
- Claramente especificada
- Facilidade para iniciantes
- 30/100