google / google/python-fire

Unexpected parsing behaviour for List of strings containing a string with a numeric initial

Open
#411 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
28.2k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

This is just a report. I hope it will be useful for development. I'm using fire v0.4.0.

```python
# tmp.py
import fire
def main(keyword_list):
print([(keyword,type(keyword)) for keyword in keyword_list])
fire.Fire(main)
```
Will give you:
```
> python tmp.py --keyword_list=tmp,0
[('tmp', ), (0, )]

> python tmp.py --keyword_list=tmp,01
[('t', ), ('m', ), ('p', ), (',', ), ('0', ), ('1', )]

> python tmp.py --keyword_list=tmp,0tmp
[('t', ), ('m', ), ('p', ), (',', ), ('0', ), ('t', ), ('m', ), ('p', )]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.