One class per file?

Ben Finney bignose+hates-spam at benfinney.id.au
Mon Sep 29 19:14:11 EDT 2008


HCB <hypercaffeinatedbiped at gmail.com> writes:

> The "Put one class in one file" statement is made in "Code Complete
> 2" page 771.

Thanks. I don't have the second edition; I wonder what the context of
that advice is? Perhaps he's speaking only of C++ or Java.

Certainly I'd expect the author to reconsider that advice for
languages (such as Python) where classes are routinely quite small and
there are no technical barriers to grouping multiple classes in a
file.

-- 
 \       “I believe in making the world safe for our children, but not |
  `\    our children's children, because I don't think children should |
_o__)                                     be having sex.” —Jack Handey |
Ben Finney



More information about the Python-list mailing list