PEP8 compliance and exception messages ?

Andreas Waldenburger usenot at geekmail.INVALID
Mon Dec 6 00:22:49 EST 2010


On Sun, 5 Dec 2010 19:52:54 -0800 Chris Rebert <clp2 at rebertia.com> wrote:

> On Sun, Dec 5, 2010 at 7:40 PM, shearichard <shearichard at gmail.com>
> wrote:
> > Hi - PEP8 says lines should not exceed 79 characters in length
> > ( http://www.python.org/dev/peps/pep-0008/ ).
> >
> > So if you've got some code that looks like this :
> >
> > raise fooMod.fooException("Some message which is quite long")
> >
> > ... and assuming a certain amount of indenting you're going to break
> > that guideline.
> >
> > [etc.]
> 
> Use implicit string literal concatenation:
> 
> [...]
> 
But isn't explicit string literal concatenation better than implicit string literal concatenation?

... sorry ...

On a more serious note:

> Alternatively, you could disregard PEP 8 on this point on the grounds
> that the 79/80 characters per line limit is outdated.
> 
Maybe, but it's not outmoded.

/W

-- 
To reach me via email, replace INVALID with the country code of my home 
country.  But if you spam me, I'll be one sour Kraut.




More information about the Python-list mailing list