- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for Optional (0.18 sec)
-
docs/em/docs/python-types.md
🐍 3️⃣.6️⃣ & 🔛 (✅ 🐍 3️⃣.1️⃣0️⃣) 👆 💪 📣 ⚫️ 🏭 & ⚙️ `Optional` ⚪️➡️ `typing` 🕹. ```Python hl_lines="1 4" {!../../../docs_src/python_types/tutorial009.py!} ``` ⚙️ `Optional[str]` ↩️ `str` 🔜 ➡️ 👨🎨 ℹ 👆 🔍 ❌ 🌐❔ 👆 💪 🤔 👈 💲 🕧 `str`, 🕐❔ ⚫️ 💪 🤙 `None` 💁♂️. `Optional[Something]` 🤙 ⌨ `Union[Something, None]`, 👫 🌓. 👉 ⛓ 👈 🐍 3️⃣.1️⃣0️⃣, 👆 💪 ⚙️ `Something | None`:
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 13.6K bytes - Viewed (0) -
docs/en/docs/python-types.md
``` #### Using `Union` or `Optional` If you are using a Python version below 3.10, here's a tip from my very **subjective** point of view: * 🚨 Avoid using `Optional[SomeType]` * Instead ✨ **use `Union[SomeType, None]`** ✨.
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 17K bytes - Viewed (0) -
docs/ja/docs/python-types.md
* 変数`prices`は`dict`であり: * この`dict`のキーは`str`型です。(つまり、各項目の名前) * この`dict`の値は`float`型です。(つまり、各項目の価格) #### `Optional` また、`Optional`を使用して、変数が`str`のような型を持つことを宣言することもできますが、それは「オプション」であり、`None`にすることもできます。 ```Python hl_lines="1 4" {!../../../docs_src/python_types/tutorial009.py!} ``` ただの`str`の代わりに`Optional[str]`を使用することで、エディタは値が常に`str`であると仮定している場合に実際には`None`である可能性があるエラーを検出するのに役立ちます。 #### ジェネリック型
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 11.8K bytes - Viewed (0) -
docs/vi/docs/python-types.md
```Python hl_lines="1 4" {!../../../docs_src/python_types/tutorial009.py!} ``` Sử dụng `Optional[str]` thay cho `str` sẽ cho phép trình soạn thảo giúp bạn phát hiện các lỗi mà bạn có thể gặp như một giá trị luôn là một `str`, trong khi thực tế nó rất có thể là `None`.
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 21.9K bytes - Viewed (0) -
docs/uk/docs/python-types.md
#### Possibly `None` (Optional) Ви можете оголосити, що значення може мати тип, наприклад `str`, але також може бути `None`. У Python 3.6 і вище (включаючи Python 3.10) ви можете оголосити його, імпортувавши та використовуючи `Optional` з модуля `typing`. ```Python hl_lines="1 4" {!../../../docs_src/python_types/tutorial009.py!} ```
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 19.7K bytes - Viewed (0) -
docs/ru/docs/python-types.md
#### `Optional` Вы также можете использовать `Optional`, чтобы объявить, что переменная имеет тип, например, `str`, но это является «необязательным», что означает, что она также может быть `None`: ```Python hl_lines="1 4" {!../../../docs_src/python_types/tutorial009.py!} ```
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 14.6K bytes - Viewed (0) -
docs/de/docs/python-types.md
``` #### `Union` oder `Optional` verwenden? Wenn Sie eine Python-Version unterhalb 3.10 verwenden, hier ist mein sehr **subjektiver** Standpunkt dazu: * 🚨 Vermeiden Sie `Optional[SomeType]` * Stattdessen ✨ **verwenden Sie `Union[SomeType, None]`** ✨.
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 20:29:25 GMT 2024 - 19.3K bytes - Viewed (0) -
docs/bn/docs/python-types.md
!!! Tip যখন আপনি `Optional` বা `Union[Something, None]` ব্যবহার করেন এবং কোনো ডিফল্ট মান না থাকে, Pydantic-এর একটি বিশেষ আচরণ রয়েছে, আপনি Pydantic ডকুমেন্টেশনে [Required Optional fields](https://docs.pydantic.dev/latest/concepts/models/#required-optional-fields) সম্পর্কে আরও পড়তে পারেন। ## মেটাডাটা অ্যানোটেশন সহ টাইপ হিন্টস
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Wed Apr 03 15:34:37 GMT 2024 - 36K bytes - Viewed (0) -
docs/ko/docs/python-types.md
* `dict`의 키(key)는 `str`타입이다. (각 아이템의 이름(name)) * `dict`의 값(value)는 `float`타입이다. (각 아이템의 가격(price)) #### `Optional` `str`과 같이 타입을 선언할 때 `Optional`을 쓸 수도 있는데, "선택적(Optional)"이기때문에 `None`도 될 수 있습니다: ```Python hl_lines="1 4" {!../../../docs_src/python_types/tutorial009.py!} ``` `Optional[str]`을 `str` 대신 쓰게 되면, 특정 값이 실제로는 `None`이 될 수도 있는데 항상 `str`이라고 가정하는 상황에서 에디터가 에러를 찾게 도와줄 수 있습니다. #### Generic(제네릭) 타입
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 10.5K bytes - Viewed (0) -
docs/tr/docs/python-types.md
#### `Optional` `Optional` bir değişkenin `str`gibi bir tipi olabileceğini ama isteğe bağlı olarak tipinin `None` olabileceğini belirtir: ```Python hl_lines="1 4" {!../../../docs_src/python_types/tutorial009.py!} ```
Plain Text - Registered: Sun Apr 21 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 9.7K bytes - Viewed (0)