- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 974 for strl (0.04 sec)
-
docs/uk/docs/python-types.md
```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial009.py!} ``` Використання `Optional[str]` замість просто `str` дозволить редактору допомогти вам виявити помилки, коли ви могли б вважати, що значенням завжди є `str`, хоча насправді воно також може бути `None`. `Optional[Something]` насправді є скороченням для `Union[Something, None]`, вони еквівалентні. Це також означає, що в Python 3.10 ви можете використовувати `Something | None`:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 19.5K bytes - Viewed (0) -
docs/zh/docs/python-types.md
然后你尝试向程序员老手的朋友——编辑器自动补全寻求帮助。 输入函数的第一个参数 `first_name`,输入点号(`.`)然后敲下 `Ctrl+Space` 来触发代码补全。 但遗憾的是并没有起什么作用: <img src="https://fastapi.tiangolo.com/img/python-types/image01.png"> ### 添加类型 让我们来修改上面例子的一行代码。 我们将把下面这段代码中的函数参数从: ```Python first_name, last_name ``` 改成: ```Python first_name: str, last_name: str ``` 就是这样。 这些就是"类型提示": ```Python hl_lines="1"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.6K bytes - Viewed (0) -
docs/ko/docs/index.md
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 16 16:50:01 UTC 2024 - 19.4K bytes - Viewed (0) -
tensorflow/c/c_api_function_test.cc
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Jul 20 22:08:54 UTC 2023 - 63.6K bytes - Viewed (0) -
tests/test_dependency_class.py
class MethodsDependency: def synchronous(self, value: str) -> str: return value async def asynchronous(self, value: str) -> str: return value def synchronous_gen(self, value: str) -> Generator[str, None, None]: yield value async def asynchronous_gen(self, value: str) -> AsyncGenerator[str, None]: yield value callable_dependency = CallableDependency()
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Aug 09 10:54:05 UTC 2020 - 3.3K bytes - Viewed (0) -
docs/en/docs/index.md
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float is_offer: Union[bool, None] = None @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} @app.put("/items/{item_id}")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 20.4K bytes - Viewed (0) -
fastapi/params.py
annotation: Optional[Any] = None, alias: Optional[str] = None, alias_priority: Union[int, None] = _Unset, # TODO: update when deprecating Pydantic v1, import these types # validation_alias: str | AliasPath | AliasChoices | None validation_alias: Union[str, None] = None, serialization_alias: Union[str, None] = None, title: Optional[str] = None, description: Optional[str] = None,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Sep 06 18:06:20 UTC 2024 - 27.5K bytes - Viewed (0) -
fastapi/dependencies/models.py
name: Optional[str] = None call: Optional[Callable[..., Any]] = None request_param_name: Optional[str] = None websocket_param_name: Optional[str] = None http_connection_param_name: Optional[str] = None response_param_name: Optional[str] = None background_tasks_param_name: Optional[str] = None security_scopes_param_name: Optional[str] = None security_scopes: Optional[List[str]] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 31 20:19:30 UTC 2024 - 1.5K bytes - Viewed (0) -
fastapi/openapi/models.py
description: Optional[str] = None content: Dict[str, MediaType] required: Optional[bool] = None class Link(BaseModelWithConfig): operationRef: Optional[str] = None operationId: Optional[str] = None parameters: Optional[Dict[str, Union[Any, str]]] = None requestBody: Optional[Union[Any, str]] = None description: Optional[str] = None server: Optional[Server] = None
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 22:49:33 UTC 2024 - 15K bytes - Viewed (0) -
docs/ko/docs/python-types.md
* 변수 `prices`는 `dict`이다: * `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`이라고 가정하는 상황에서 에디터가 에러를 찾게 도와줄 수 있습니다.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.5K bytes - Viewed (0)