]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Change the word "unwrap" to "unpack" in `docs/en/docs/tutorial/extra-models.md...
authortimothy <53824764+timothy-jeong@users.noreply.github.com>
Thu, 30 Jan 2025 12:21:44 +0000 (21:21 +0900)
committerGitHub <noreply@github.com>
Thu, 30 Jan 2025 12:21:44 +0000 (12:21 +0000)
Co-authored-by: timothy <53824764+jts8257@users.noreply.github.com>
Co-authored-by: Sofie Van Landeghem <svlandeg@users.noreply.github.com>
docs/en/docs/tutorial/extra-models.md

index 5fac3f69e00375e3d77ba76284a5691aecc9d630..ed1590ece1beeb732210f740336a0b7e7fbbbd81 100644 (file)
@@ -70,9 +70,9 @@ we would get a Python `dict` with:
 }
 ```
 
-#### Unwrapping a `dict`
+#### Unpacking a `dict`
 
-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.
+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.
 
 So, continuing with the `user_dict` from above, writing:
 
@@ -117,11 +117,11 @@ would be equivalent to:
 UserInDB(**user_in.dict())
 ```
 
-...because `user_in.dict()` is a `dict`, and then we make Python "unwrap" it by passing it to `UserInDB` prefixed with `**`.
+...because `user_in.dict()` is a `dict`, and then we make Python "unpack" it by passing it to `UserInDB` prefixed with `**`.
 
 So, we get a Pydantic model from the data in another Pydantic model.
 
-#### Unwrapping a `dict` and extra keywords
+#### Unpacking a `dict` and extra keywords
 
 And then adding the extra keyword argument `hashed_password=hashed_password`, like in: