Flat is better than nested. - PEP 20 - Zen of Python
Repetitive paths are confusing for both your tools and your developers. - Ken Reitz
First, what is a repetitive path?
Let me show you.
Go to Flask's Github repo.
# root dir: Flask ├── docs ├── flask # here, too! ├── tests
Repeating 'flask' = repetitive path
Same thing in mypy:
# root dir: mypy ├── docs ├── misc ├── mypy # we get it!
Celery does it, and so does httpie, and the project initializers for Django and Scrapy do it, too.
There are some variations on the theme, too. pip does this:
# root dir: pip ├── docs ├── src │ └── pip # somehow better and worse simultaneously ├── tests
sqlalchemy does this:
# root dir: sqlalchemy ├── doc ├── lib │ └── sqlalchemy # fine, whatever ├── test
There are exceptions. pytest and Pillow both put their source code in, well,
Make sense, yes?
Strangest of all:
requestsis a project whose repo, you guessed it, looks like this:
# root dir: requests ├── docs ├── requests # up is down, left is right ├── tests
I want to ask Python people about this.
I'd ask StackOverflow but the mob would sweep me away in a wave of downvotes. Maybe IRC...