Skip to content

docs: clarify deepcopy import in Making the Board lesson (#438) - #568

Closed
DieimesNunes wants to merge 1 commit into
alexmojaki:mainfrom
DieimesNunes:fix-438-deepcopy-import
Closed

DieimesNunes wants to merge 1 commit into
alexmojaki:mainfrom
DieimesNunes:fix-438-deepcopy-import

Conversation

@DieimesNunes

Copy link
Copy Markdown

Summary

This PR addresses issue #438 by clarifying how to use the deepcopy function in the Making the Board lesson.

The lesson previously mentioned deepcopy as an alternative to shallow copying but did not explain that it must be imported from Python's copy module.

Changes

  • Added an explanation that deepcopy must be imported before use.
  • Included the import example: from copy import deepcopy.
  • Clarified how deepcopy(board) creates an independent copy of the board.
  • Regenerated the English translation files to keep the course content synchronized.

Testing

  • Reproduced NameError: name 'deepcopy' is not defined when using the function without importing it.
  • Verified that importing deepcopy resolves the error and preserves the original board.
  • Regenerated translation resources using poetry run python -m translations.generate_po_file.
  • Ran poetry run pytest -k test_steps — 1 passed, 9 deselected.
  • Ran git diff --check — passed.

This change only updates the course explanation and its translation resources; no application logic was modified.

Fixes #438

This contribution was prepared with AI assistance and manually reviewed and tested.

@alexmojaki

Copy link
Copy Markdown
Owner

Choosing not to do this as per my comment on the issue. Thanks for your effort anyway.

@alexmojaki alexmojaki closed this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deepcopy function https://futurecoder.io/course/#MakingTheBoard

2 participants