Consider mentioning deep copies

Abierto
#187 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
64/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
HTML
Estrellas
25
Forks
65
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de LibraryCarpentry/lc-python-intro

Todos los issues de LibraryCarpentry/lc-python-intro

Issues similares

Más issues de Documentation

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.