- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for computed (0.24 sec)
-
docs/zh/docs/advanced/async-sql-databases.md
### 关于 `{**note.dict(), "id": last_record_id}` `note` 是 Pydantic `Note` 对象: `note.dict()` 返回包含如下数据的**字典**: ```Python { "text": "Some note", "completed": False, } ``` 但它不包含 `id` 字段。 因此要新建一个包含 `note.dict()` 键值对的**字典**: ```Python {**note.dict()} ``` `**note.dict()` 直接**解包**键值对, 因此,`{**note.dict()}` 是 `note.dict()` 的副本。
Plain Text - Registered: Sun Mar 31 07:19:09 GMT 2024 - Last Modified: Sat Mar 30 22:44:40 GMT 2024 - 4.3K bytes - Viewed (0)