[Tutor] confusion about imports

Steven D'Aprano steve at pearwood.info
Tue Jul 10 04:04:03 CEST 2012


Mark Lawrence wrote:
> On 09/07/2012 16:56, Chris Hare wrote:
>>
>> So, I have to admit, imports have me really confused.  I am trying to 
>> break apart a 10,000+ line single file into various files
> 
> Please don't break the file up for the sake of doing it, you're writing 
> python not java :-)

Agreed, but 10,000 lines is a pretty good reason for breaking up a file.

The largest single module in the Python standard library is decimal.py, and 
that's only 6250 lines. With 18 classes and 20 top-level functions, to my 
mind, that's about the limit of maintainability for a single file.


-- 
Steven



More information about the Tutor mailing list