Consider mentioning deep copies

Offen
#187 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
64/100
Issue-Typ
Dokumentation
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
python
Bereich
documentation

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
HTML
Sterne
25
Forks
65
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus LibraryCarpentry/lc-python-intro

Alle Issues in LibraryCarpentry/lc-python-intro

Ähnliche Issues

Weitere Issues zu Documentation

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.