Don't you just love writing this sort of thing :)

Duncan Booth duncan.booth at invalid.invalid
Fri Dec 5 03:31:38 EST 2008


Lawrence D'Oliveiro <ldo at geek-central.gen.new_zealand> wrote:

> In message <Xns9B6A5BBC973F5duncanbooth at 127.0.0.1>, Duncan Booth wrote:
> 
>> Have you ever considered trying to write readable code instead?
>>     
>> (I must admit I haven't checked whether GZipFile works with the 'with'
>> statement...
> 
> That's why I prefer writing _correct_ code instead.

Good idea, but the mess you posted is going to be virtually untestable 
whereas splitting it up into small testable functions will make it much 
easier for you to actually get somewhere near your goal of correct code.

BTW, by trimming half of my sentence you changed its meaning significantly. 
You implied that I gave an example without caring whether it could work 
whereas the other half of the sentence pointed out that if GZipFile 
requires it you may need to add a single function call to my code.

-- 
Duncan Booth http://kupuguy.blogspot.com



More information about the Python-list mailing list