79 chars or more?

Neil Cerutti neilc at norwich.edu
Tue Aug 17 08:42:15 EDT 2010


On 2010-08-17, Michael Torrie <torriem at gmail.com> wrote:
> In general if I find myself consistently going longer than 75
> or 80 characters, I need to refactor my code to make it more
> manageable.  If I have to scroll up five pages to find the
> beginning of a block, that normally means my code could be
> simplified and improved.

Looking through my code, the split-up lines almost always include
string literals or elimination of meaningless temporary
variables, e.g.:

        self.expiration_date = translate_date(find(response,
            'MPNExpirationDate').text, '%Y-%m-%d', '%m%d%Y')

The other cases are when indentation levels get the best of me,
but I'm too lazy to refactor.

-- 
Neil Cerutti



More information about the Python-list mailing list