Download fixtures/pattern_lab/src/slugify.py from tailot/codex-python: direct link, hf CLI and curl.
- Browser
- Download file 389 Bytes
-
https://huggingface.co/datasets/tailot/codex-python/resolve/main/fixtures/pattern_lab/src/slugify.py
- Command line
-
hf download hf://datasets/tailot/codex-python/fixtures/pattern_lab/src/slugify.py
-
curl -L -o slugify.py https://huggingface.co/datasets/tailot/codex-python/resolve/main/fixtures/pattern_lab/src/slugify.py
389 Bytes
| """Building slugs from a list of segments. | |
| One function here carries a list as a default argument, which is the shape the mutable | |
| default pattern refuses to leave in place. The other carries a tuple, which is a | |
| default the pattern leaves alone. | |
| """ | |
| def add_tag(name, tags=[]): | |
| tags.append(name) | |
| return tags | |
| def join_parts(parts=("root",), sep="-"): | |
| return sep.join(parts) | |