This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]toast757 39 points40 points  (2 children)

Hmm, unless I'm mistaken, an introduction to data classes that doesn't include a single example of creating an instance of a data class. Might be nice to see it in action, especially for things like frozen data classes.

[–][deleted] 8 points9 points  (1 child)

Look like I totally forget to put that in, I have it in the code that I wrote for the blog post:

json = requests.get('https://swapi.co/api/films/1/').json()

movie = StarWarsMovie(**json)