AllenDowney / AllenDowney/ThinkPython

Add an introduction or exercise for dataclass in Ch. 18?

Open
#77 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
2.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Since the book already cover namedtuple in Ch.18, maybe consider adding dataclass as well? It's been in the stdlib since 3.7 and is pretty common nowadays.

It'd be a nice complement to namedtuple—mutable, supports methods, less boilerplate than writing a regular class. Readers would find it useful.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Chapter 18's existing namedtuple material and the repository's notebook structure. Determine whether the dataclass addition should be an introduction or an exercise, and make the chosen material a clear complement to namedtuple. Done means Chapter 18 includes a coherent dataclass treatment suitable for readers.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
content, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.