PEP8 compliance and exception messages ?
shearichard
shearichard at gmail.com
Tue Dec 7 05:49:00 EST 2010
More information about the Python-list mailing list
Tue Dec 7 05:49:00 EST 2010
- Previous message (by thread): PEP8 compliance and exception messages ?
- Next message (by thread): PEP8 compliance and exception messages ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Dec 6, 6:21 pm, Ben Finney <ben+pyt... at benfinney.id.au> wrote: > shearichard <shearich... at gmail.com> writes: > > 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") > > PEP 8 also says those names are poorly chosen. Better: > > raise foomod.FooException("Some message which is quite long") > > > raise fooMod.fooException("\ > > Some message \ > > which is quite long") > > Take advantage of the parsing of string literals and parenthesis: > > raise foomod.FooException( > "Some message" > " which is quite long") > > and for the sake of my eyes, avoid camelCase. OK you got me ! Thanks for pointing this out, I will take a look at the relevant section
- Previous message (by thread): PEP8 compliance and exception messages ?
- Next message (by thread): PEP8 compliance and exception messages ?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list