Skip to content

Commit b96be4e

Browse files
authored
Update README.md
1 parent 0800c7b commit b96be4e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,18 @@ Literal
215215

216216
If you're using Python 3.9+, then you can replace `List` with `list`, `Set` with `set`, and `Tuple` with `tuple`.
217217

218+
Additionally, any type that can be instantiated with a string argument can be used. For example, in
219+
```
220+
from pathlib import Path
221+
from tap import Tap
222+
223+
class Args(Tap):
224+
path: Path
225+
226+
args = Args().parse_args()
227+
```
228+
`args.path` is a `Path` instance containing the string passed in through the command line.
229+
218230
#### `str`, `int`, and `float`
219231

220232
Each is automatically parsed to their respective types, just like argparse.

0 commit comments

Comments
 (0)