Best practice for large source code projects
Paul Rubin
http
Fri Sep 22 20:57:12 EDT 2006
"dhable at gmail.com" <dhable at gmail.com> writes:
> It works and things make sense to me. Yet, I feel uneasy that my
> model.py file is starting to approach 500 lines. What's the best
> practice or community opinion on this? Do I keep everything in a single
> file or do I start dividing things into separate files?
It varies by project and preference. Working with very large files
can get cumbersome, but having a lot of small files means higher
amounts of editing hassle and more junk to keep track of.
As a personal opinion, I'd say just try to keep your functions small
and understandable, and don't worry about file size until the files
start getting inconvenient to edit. I find 1000-2000 lines is a
reasonable file size.
More information about the Python-list
mailing list