Access dict keys and values
未關閉
enhancement
- 主要語言
- Python
- 星號
- 28.2k
- 分支
- 1.5k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
My script returns a dictionary from command `script.py command`. That works well. But when I try to list just keys (`script.py command keys`) or values (`script.py command values`), I get error `Cannot find target in dict` instead of the expected list of keys or values. Please extend `dict` handling with support for `.keys()` and `.values()` methods.
貢獻指南
研究方向
Reproduce the behavior with the mentioned script.py command, then trace Python Fire's dictionary target handling and the command entry point. Verify how keys and values are currently resolved, and consider the work complete when `script.py command keys` and `script.py command values` return the corresponding lists without the target error.
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- cli
- Issue 類型
- 功能
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100