Skip to content

Commit 83ab6ac

Browse files
📝 Change the word "unwrap" to "unpack" in docs/en/docs/tutorial/extra-models.md (#13061)
Co-authored-by: timothy <[email protected]> Co-authored-by: Sofie Van Landeghem <[email protected]>
1 parent 3d02a92 commit 83ab6ac

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎docs/en/docs/tutorial/extra-models.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ we would get a Python `dict` with:
7070
}
7171
```
7272

73-
#### Unwrapping a `dict`
73+
#### Unpacking a `dict`
7474

75-
If we take a `dict` like `user_dict` and pass it to a function (or class) with `**user_dict`, Python will "unwrap" it. It will pass the keys and values of the `user_dict` directly as key-value arguments.
75+
If we take a `dict` like `user_dict` and pass it to a function (or class) with `**user_dict`, Python will "unpack" it. It will pass the keys and values of the `user_dict` directly as key-value arguments.
7676

7777
So, continuing with the `user_dict` from above, writing:
7878

@@ -117,11 +117,11 @@ would be equivalent to:
117117
UserInDB(**user_in.dict())
118118
```
119119

120-
...because `user_in.dict()` is a `dict`, and then we make Python "unwrap" it by passing it to `UserInDB` prefixed with `**`.
120+
...because `user_in.dict()` is a `dict`, and then we make Python "unpack" it by passing it to `UserInDB` prefixed with `**`.
121121

122122
So, we get a Pydantic model from the data in another Pydantic model.
123123

124-
#### Unwrapping a `dict` and extra keywords
124+
#### Unpacking a `dict` and extra keywords
125125

126126
And then adding the extra keyword argument `hashed_password=hashed_password`, like in:
127127

0 commit comments

Comments
 (0)