If the code exceeding 80 chars is a function call (or definition), break the argument line. Python will recognise the parenthesis, and sees that as one line.
function(arg, arg, arg, arg,
arg, arg, arg...)
If the code exceeding 80 chars is a line of code that isn't naturally breakable, you can use the backslash \
to "escape" the newline.
some.weird.namespace.thing.that.is.long = ','.join(strings) + \
'another string'
You can also use the parenthesis to your advantage.
some.weird.namespace.thing.that.is.long = (','.join(strings) +
'another string')
All types of set brackets {} (dict/set), [] (list), () (tuples) can be broken across several lines without problems. This allows for nicer formatting.
mydict = {
'key': 'value',
'yes': 'no'
}