Ability use args, kwargs with delimiter
Đang mở
- Ngôn ngữ chính
- Python
- Star
- 28.2k
- Fork
- 1.5k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Fire now try to parse flat args and kwargs, but often this not convenient
Example:
```
import fire
def test(*args, **kwargs):
print(kwargs)
print(args)
fire.Fire(test)
```
`python main.py arg1 arg2 --kwarg1 1 --kwarg2 2`
`
{'kwarg1': 1, 'kwarg2': 2}
('arg1', 'arg2')
`
In some cases will be much more simple have opportunity to set *args **kwargs like this :
`
python main.py --args arg1 --args arg2 --kwargs kwarg1=1 --kwargs kwarg2=2
`
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.