Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update description for string type in Standard Library Types documentation section #7238

Merged
merged 1 commit into from Aug 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/usage/types/standard_types.md
Expand Up @@ -11,7 +11,7 @@ Pydantic supports many common types from the Python standard library. If you nee
| `bool` | See [Booleans](booleans.md) for details on how bools are validated and what values are permitted. |
| `int` | Pydantic uses `int(v)` to coerce types to an `int`. See [Number Types](number_types.md) for more details. See the [Data Conversion](../models.md#data-conversion) warning on loss of information during data conversion. |
| `float` | `float(v)` is used to coerce values to floats. See [Number Types](number_types.md) for more details. |
| `str` | Strings are accepted as-is. `int`, `float`, and `Decimal` are coerced using `str(v)`. `bytes` and `bytearray` are converted using `v.decode()`. `Enum`s inheriting from `str` are converted using `v.value`. All other types cause an error. See [String Types](string_types.md) for more details. |
| `str` | Strings are accepted as-is. `bytes` and `bytearray` are converted using `v.decode()`. `Enum`s inheriting from `str` are converted using `v.value`. All other types cause an error. See [String Types](string_types.md) for more details. |
| `bytes` | `bytes` are accepted as-is. `bytearray` is converted using `bytes(v)`. `str` are converted using `v.encode()`. `int`, `float`, and `Decimal` are coerced using `str(v).encode()`. See [ByteSize](bytesize.md) for more details. |
| `list` | Allows `list`, `tuple`, `set`, `frozenset`, `deque`, or generators and casts to a list. See [`typing.List`](list_types.md) for sub-type constraints. |
| `tuple` | Allows `list`, `tuple`, `set`, `frozenset`, `deque`, or generators and casts to a tuple. See [`typing.Tuple`](list_types.md) for sub-type constraints. |
Expand Down