# 类型错误：需要asyncio.Future、协程或可等待对象

- **ID:** `python/asyncio-gather-return-exceptions`
- **领域:** python
- **类别:** type_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

向asyncio.gather()或asyncio.wait()传递不可等待的对象（如结果列表）。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.7 | active | — | — |
| 3.8 | active | — | — |
| 3.9 | active | — | — |

## 解决方案

1. **** (100% 成功率)
   ```
   await asyncio.gather(coro1(), coro2())
   ```
2. **** (95% 成功率)
   ```
   tasks = [asyncio.create_task(coro()) for coro in coros]; await asyncio.gather(*tasks)
   ```

## 无效尝试

- **** — ensure_future() expects coroutines or futures, not plain values. (90% 失败率)
- **** — create_task() also requires coroutines, not arbitrary objects. (90% 失败率)
