Consider mentioning deep copies

Aberta
#187 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
64/100
Tipo de issue
Documentação
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
python
Domínio
documentation

Direção de pesquisa

Read the Ch2 material on assignment and the Ch3 section introducing lists and mutable/immutable types; the issue also points to Ch7 examples with lists of dataframes. Decide where a deep-copy explanation best fits without overwhelming learners, then update the relevant lesson material. Done when the pitfall and when deep copies are useful are explained at an appropriate point in the course.

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

Descrição

How could the content be improved?

In Ch2 the learners are taught that if you define b = a, any subsequent changes to a do not affect b . This is true for immutable variables but not for all data types.

Then in Ch3 we start modifying objects in-place, and in Ch7 we end up with things like lists of dataframes (nested mutables!). So it would be useful to mention the need for deep copies at some point to avoid a common pitfall people may face when writing their own code.

A logical place might be in Ch3 when you start on lists and mutable/immutable types, but I worry it's too early in the course and will just be confusing

Linguagem predominante
HTML
Estrelas
25
Forks
65
Métricas de merge de PRs
Nenhum PR com merge em 30d

Preparar o ambiente

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 LibraryCarpentry/lc-python-intro

Todas as issues de LibraryCarpentry/lc-python-intro

Issues semelhantes

Mais issues de Documentation

Receba novas issues na sua caixa de entrada

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